diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81b018ad684f3a35fee301741b2734c8f4..0000000000000000000000000000000000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/Wishlist-application.iml b/.idea/Wishlist-application.iml deleted file mode 100644 index fc468d7d2cdaf5ee4ef3a72f5477cce203f2a472..0000000000000000000000000000000000000000 --- a/.idea/Wishlist-application.iml +++ /dev/null @@ -1,143 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<module type="WEB_MODULE" version="4"> - <component name="NewModuleRootManager"> - <content url="file://$MODULE_DIR$"> - <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="App\" /> - <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="App\Tests\" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/composer" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/collections" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/dbal" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/deprecations" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/doctrine-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/doctrine-migrations-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/event-manager" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/inflector" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/instantiator" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/lexer" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/migrations" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/orm" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/persistence" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/sql-formatter" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/egulias/email-validator" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/jms/metadata" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/masterminds/html5" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/manifest" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phar-io/version" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-common" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/reflection-docblock" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpdocumentor/type-resolver" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpstan/phpdoc-parser" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-invoker" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/phpunit" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/psr/cache" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/psr/clock" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/psr/event-dispatcher" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/psr/link" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/cli-parser" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/complexity" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/lines-of-code" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-reflector" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/resource-operations" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/type" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/version" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/asset" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/asset-mapper" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/browser-kit" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/cache" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/cache-contracts" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/clock" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/config" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/console" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/css-selector" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/debug-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/dependency-injection" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/deprecation-contracts" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/doctrine-bridge" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/doctrine-messenger" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/dom-crawler" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/dotenv" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/error-handler" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher-contracts" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/expression-language" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/filesystem" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/flex" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/form" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/framework-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-client" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-client-contracts" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-kernel" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/intl" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/mailer" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/maker-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/messenger" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/mime" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/monolog-bridge" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/monolog-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/notifier" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/options-resolver" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/password-hasher" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/phpunit-bridge" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-grapheme" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-icu" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-idn" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-intl-normalizer" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php83" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/property-access" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/property-info" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/runtime" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/security-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/security-core" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/security-csrf" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/security-http" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/serializer" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/stimulus-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/stopwatch" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/string" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/twig-bridge" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/twig-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/type-info" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/ux-turbo" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/validator" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-dumper" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-exporter" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/web-link" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/web-profiler-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/theseer/tokenizer" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/twig/extra-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/vich/uploader-bundle" /> - <excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" /> - </content> - <orderEntry type="inheritedJdk" /> - <orderEntry type="sourceFolder" forTests="false" /> - </component> -</module> \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index a225fb58202f71cfbbe9e6035367f4dcacb082d6..0000000000000000000000000000000000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="ProjectModuleManager"> - <modules> - <module fileurl="file://$PROJECT_DIR$/.idea/Wishlist-application.iml" filepath="$PROJECT_DIR$/.idea/Wishlist-application.iml" /> - </modules> - </component> -</project> \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100644 index 38b033e9d74480324a70b5c0bb710eb0e09707e7..0000000000000000000000000000000000000000 --- a/.idea/php.xml +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="MessDetectorOptionsConfiguration"> - <option name="transferred" value="true" /> - </component> - <component name="PHPCSFixerOptionsConfiguration"> - <option name="transferred" value="true" /> - </component> - <component name="PHPCodeSnifferOptionsConfiguration"> - <option name="highlightLevel" value="WARNING" /> - <option name="transferred" value="true" /> - </component> - <component name="PhpIncludePathManager"> - <include_path> - <path value="$PROJECT_DIR$/vendor/doctrine/persistence" /> - <path value="$PROJECT_DIR$/vendor/doctrine/inflector" /> - <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-migrations-bundle" /> - <path value="$PROJECT_DIR$/vendor/sebastian/global-state" /> - <path value="$PROJECT_DIR$/vendor/sebastian/complexity" /> - <path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" /> - <path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" /> - <path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" /> - <path value="$PROJECT_DIR$/vendor/sebastian/cli-parser" /> - <path value="$PROJECT_DIR$/vendor/sebastian/diff" /> - <path value="$PROJECT_DIR$/vendor/sebastian/lines-of-code" /> - <path value="$PROJECT_DIR$/vendor/sebastian/type" /> - <path value="$PROJECT_DIR$/vendor/sebastian/version" /> - <path value="$PROJECT_DIR$/vendor/sebastian/comparator" /> - <path value="$PROJECT_DIR$/vendor/sebastian/environment" /> - <path value="$PROJECT_DIR$/vendor/sebastian/exporter" /> - <path value="$PROJECT_DIR$/vendor/sebastian/code-unit" /> - <path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" /> - <path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" /> - <path value="$PROJECT_DIR$/vendor/webmozart/assert" /> - <path value="$PROJECT_DIR$/vendor/masterminds/html5" /> - <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" /> - <path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" /> - <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" /> - <path value="$PROJECT_DIR$/vendor/composer" /> - <path value="$PROJECT_DIR$/vendor/psr/container" /> - <path value="$PROJECT_DIR$/vendor/psr/cache" /> - <path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" /> - <path value="$PROJECT_DIR$/vendor/psr/log" /> - <path value="$PROJECT_DIR$/vendor/psr/link" /> - <path value="$PROJECT_DIR$/vendor/psr/clock" /> - <path value="$PROJECT_DIR$/vendor/twig/twig" /> - <path value="$PROJECT_DIR$/vendor/twig/extra-bundle" /> - <path value="$PROJECT_DIR$/vendor/nikic/php-parser" /> - <path value="$PROJECT_DIR$/vendor/egulias/email-validator" /> - <path value="$PROJECT_DIR$/vendor/monolog/monolog" /> - <path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" /> - <path value="$PROJECT_DIR$/vendor/phar-io/manifest" /> - <path value="$PROJECT_DIR$/vendor/phar-io/version" /> - <path value="$PROJECT_DIR$/vendor/phpstan/phpdoc-parser" /> - <path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" /> - <path value="$PROJECT_DIR$/vendor/phpunit/php-timer" /> - <path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" /> - <path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" /> - <path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" /> - <path value="$PROJECT_DIR$/vendor/phpunit/phpunit" /> - <path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" /> - <path value="$PROJECT_DIR$/vendor/symfony/dependency-injection" /> - <path value="$PROJECT_DIR$/vendor/symfony/security-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/mime" /> - <path value="$PROJECT_DIR$/vendor/symfony/validator" /> - <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php83" /> - <path value="$PROJECT_DIR$/vendor/symfony/browser-kit" /> - <path value="$PROJECT_DIR$/vendor/symfony/dom-crawler" /> - <path value="$PROJECT_DIR$/vendor/symfony/http-client-contracts" /> - <path value="$PROJECT_DIR$/vendor/symfony/css-selector" /> - <path value="$PROJECT_DIR$/vendor/symfony/property-access" /> - <path value="$PROJECT_DIR$/vendor/symfony/monolog-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher-contracts" /> - <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-grapheme" /> - <path value="$PROJECT_DIR$/vendor/symfony/yaml" /> - <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-icu" /> - <path value="$PROJECT_DIR$/vendor/symfony/cache" /> - <path value="$PROJECT_DIR$/vendor/symfony/doctrine-bridge" /> - <path value="$PROJECT_DIR$/vendor/symfony/options-resolver" /> - <path value="$PROJECT_DIR$/vendor/symfony/asset-mapper" /> - <path value="$PROJECT_DIR$/vendor/symfony/twig-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/doctrine-messenger" /> - <path value="$PROJECT_DIR$/vendor/symfony/runtime" /> - <path value="$PROJECT_DIR$/vendor/symfony/clock" /> - <path value="$PROJECT_DIR$/vendor/symfony/http-kernel" /> - <path value="$PROJECT_DIR$/vendor/symfony/mailer" /> - <path value="$PROJECT_DIR$/vendor/symfony/phpunit-bridge" /> - <path value="$PROJECT_DIR$/vendor/symfony/security-csrf" /> - <path value="$PROJECT_DIR$/vendor/symfony/finder" /> - <path value="$PROJECT_DIR$/vendor/symfony/expression-language" /> - <path value="$PROJECT_DIR$/vendor/symfony/maker-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/security-core" /> - <path value="$PROJECT_DIR$/vendor/symfony/security-http" /> - <path value="$PROJECT_DIR$/vendor/symfony/web-link" /> - <path value="$PROJECT_DIR$/vendor/symfony/var-exporter" /> - <path value="$PROJECT_DIR$/vendor/symfony/web-profiler-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/string" /> - <path value="$PROJECT_DIR$/vendor/symfony/service-contracts" /> - <path value="$PROJECT_DIR$/vendor/symfony/var-dumper" /> - <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" /> - <path value="$PROJECT_DIR$/vendor/symfony/serializer" /> - <path value="$PROJECT_DIR$/vendor/symfony/ux-turbo" /> - <path value="$PROJECT_DIR$/vendor/symfony/stimulus-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/type-info" /> - <path value="$PROJECT_DIR$/vendor/symfony/debug-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/routing" /> - <path value="$PROJECT_DIR$/vendor/symfony/event-dispatcher" /> - <path value="$PROJECT_DIR$/vendor/symfony/error-handler" /> - <path value="$PROJECT_DIR$/vendor/symfony/flex" /> - <path value="$PROJECT_DIR$/vendor/symfony/notifier" /> - <path value="$PROJECT_DIR$/vendor/symfony/cache-contracts" /> - <path value="$PROJECT_DIR$/vendor/symfony/property-info" /> - <path value="$PROJECT_DIR$/vendor/symfony/console" /> - <path value="$PROJECT_DIR$/vendor/symfony/framework-bundle" /> - <path value="$PROJECT_DIR$/vendor/symfony/process" /> - <path value="$PROJECT_DIR$/vendor/symfony/password-hasher" /> - <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-normalizer" /> - <path value="$PROJECT_DIR$/vendor/symfony/intl" /> - <path value="$PROJECT_DIR$/vendor/symfony/filesystem" /> - <path value="$PROJECT_DIR$/vendor/symfony/twig-bridge" /> - <path value="$PROJECT_DIR$/vendor/symfony/http-client" /> - <path value="$PROJECT_DIR$/vendor/symfony/dotenv" /> - <path value="$PROJECT_DIR$/vendor/symfony/form" /> - <path value="$PROJECT_DIR$/vendor/symfony/messenger" /> - <path value="$PROJECT_DIR$/vendor/symfony/translation" /> - <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" /> - <path value="$PROJECT_DIR$/vendor/symfony/monolog-bridge" /> - <path value="$PROJECT_DIR$/vendor/symfony/asset" /> - <path value="$PROJECT_DIR$/vendor/symfony/translation-contracts" /> - <path value="$PROJECT_DIR$/vendor/symfony/http-foundation" /> - <path value="$PROJECT_DIR$/vendor/symfony/config" /> - <path value="$PROJECT_DIR$/vendor/symfony/stopwatch" /> - <path value="$PROJECT_DIR$/vendor/theseer/tokenizer" /> - <path value="$PROJECT_DIR$/vendor/doctrine/cache" /> - <path value="$PROJECT_DIR$/vendor/doctrine/event-manager" /> - <path value="$PROJECT_DIR$/vendor/doctrine/dbal" /> - <path value="$PROJECT_DIR$/vendor/doctrine/orm" /> - <path value="$PROJECT_DIR$/vendor/doctrine/deprecations" /> - <path value="$PROJECT_DIR$/vendor/doctrine/lexer" /> - <path value="$PROJECT_DIR$/vendor/doctrine/sql-formatter" /> - <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-bundle" /> - <path value="$PROJECT_DIR$/vendor/doctrine/migrations" /> - <path value="$PROJECT_DIR$/vendor/doctrine/collections" /> - <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" /> - <path value="$PROJECT_DIR$/vendor/vich/uploader-bundle" /> - <path value="$PROJECT_DIR$/vendor/jms/metadata" /> - </include_path> - </component> - <component name="PhpProjectSharedConfiguration" php_language_level="8.2" /> - <component name="PhpStanOptionsConfiguration"> - <option name="transferred" value="true" /> - </component> - <component name="PhpUnit"> - <phpunit_settings> - <PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml.dist" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" /> - </phpunit_settings> - </component> - <component name="PsalmOptionsConfiguration"> - <option name="transferred" value="true" /> - </component> -</project> \ No newline at end of file diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml deleted file mode 100644 index 4f8104cfb166aed9afb9fa8317271ebd4f44e5cb..0000000000000000000000000000000000000000 --- a/.idea/phpunit.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="PHPUnit"> - <option name="directories"> - <list> - <option value="$PROJECT_DIR$/tests" /> - </list> - </option> - </component> -</project> \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbbc029bcab630581847471d7f238ec53..0000000000000000000000000000000000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="VcsDirectoryMappings"> - <mapping directory="" vcs="Git" /> - </component> -</project> \ No newline at end of file diff --git a/config/services.yaml b/config/services.yaml index 2d6a76f94dce138741e2d63ae83a11c1879031d9..8a31e80a6bc3977dacf465cdf30e022ebadfaefd 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -4,6 +4,7 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: + uploads_directory: '%kernel.project_dir%/public/uploads' services: # default configuration for services in *this* file diff --git a/migrations/Version20250319232441.php b/migrations/Version20250319232441.php new file mode 100644 index 0000000000000000000000000000000000000000..802975756a27c75253e43cd3f39368936869719c --- /dev/null +++ b/migrations/Version20250319232441.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250319232441 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE item (id INT AUTO_INCREMENT NOT NULL, purchase_proof_id INT DEFAULT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION NOT NULL, UNIQUE INDEX UNIQ_1F1B251EFECA7547 (purchase_proof_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE purchase_proof (id INT AUTO_INCREMENT NOT NULL, congrats_text VARCHAR(255) NOT NULL, image_path VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EFECA7547 FOREIGN KEY (purchase_proof_id) REFERENCES purchase_proof (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EFECA7547'); + $this->addSql('DROP TABLE item'); + $this->addSql('DROP TABLE purchase_proof'); + $this->addSql('DROP TABLE messenger_messages'); + } +} diff --git a/migrations/Version20250319235558.php b/migrations/Version20250319235558.php new file mode 100644 index 0000000000000000000000000000000000000000..ff7671133646ebe1e042d319dfcdb0c633c43571 --- /dev/null +++ b/migrations/Version20250319235558.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250319235558 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE purchase_proof ADD item_id INT NOT NULL'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_2F32C3F7126F525E ON purchase_proof (item_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP INDEX UNIQ_2F32C3F7126F525E ON purchase_proof'); + $this->addSql('ALTER TABLE purchase_proof DROP item_id'); + } +} diff --git a/migrations/Version20250319235641.php b/migrations/Version20250319235641.php new file mode 100644 index 0000000000000000000000000000000000000000..328a77c4acca0bce1beca90f0f3b9be3a4d80fbd --- /dev/null +++ b/migrations/Version20250319235641.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250319235641 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE item (id INT AUTO_INCREMENT NOT NULL, purchase_proof_id INT DEFAULT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION NOT NULL, UNIQUE INDEX UNIQ_1F1B251EFECA7547 (purchase_proof_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EFECA7547 FOREIGN KEY (purchase_proof_id) REFERENCES purchase_proof (id)'); + $this->addSql('ALTER TABLE purchase_proof ADD item_id INT NOT NULL'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_2F32C3F7126F525E ON purchase_proof (item_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EFECA7547'); + $this->addSql('DROP TABLE item'); + $this->addSql('DROP INDEX UNIQ_2F32C3F7126F525E ON purchase_proof'); + $this->addSql('ALTER TABLE purchase_proof DROP item_id'); + } +} diff --git a/migrations/Version20250320000820.php b/migrations/Version20250320000820.php new file mode 100644 index 0000000000000000000000000000000000000000..d8e5490b066dbc664be55e7e326348e25e7d18d1 --- /dev/null +++ b/migrations/Version20250320000820.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320000820 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE purchase_proof (id INT AUTO_INCREMENT NOT NULL, item_id INT NOT NULL, congrats_text VARCHAR(255) NOT NULL, image_path VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2F32C3F7126F525E (item_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EFECA7547 FOREIGN KEY (purchase_proof_id) REFERENCES purchase_proof (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EFECA7547'); + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP TABLE purchase_proof'); + } +} diff --git a/migrations/Version20250320000903.php b/migrations/Version20250320000903.php new file mode 100644 index 0000000000000000000000000000000000000000..c4b987f4d4d26d4120261fc70fd0289939d0cc6f --- /dev/null +++ b/migrations/Version20250320000903.php @@ -0,0 +1,35 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320000903 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE purchase_proof (id INT AUTO_INCREMENT NOT NULL, item_id INT NOT NULL, congrats_text VARCHAR(255) NOT NULL, image_path VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2F32C3F7126F525E (item_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EFECA7547 FOREIGN KEY (purchase_proof_id) REFERENCES purchase_proof (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EFECA7547'); + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP TABLE purchase_proof'); + } +} diff --git a/migrations/Version20250320001018.php b/migrations/Version20250320001018.php new file mode 100644 index 0000000000000000000000000000000000000000..e292a9b894835671238be06c2cdad9b69ce68df3 --- /dev/null +++ b/migrations/Version20250320001018.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320001018 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE item (id INT AUTO_INCREMENT NOT NULL, purchase_proof_id INT DEFAULT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION NOT NULL, UNIQUE INDEX UNIQ_1F1B251EFECA7547 (purchase_proof_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE purchase_proof (id INT AUTO_INCREMENT NOT NULL, item_id INT NOT NULL, congrats_text VARCHAR(255) NOT NULL, image_path VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2F32C3F7126F525E (item_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EFECA7547 FOREIGN KEY (purchase_proof_id) REFERENCES purchase_proof (id)'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EFECA7547'); + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP TABLE item'); + $this->addSql('DROP TABLE purchase_proof'); + $this->addSql('DROP TABLE messenger_messages'); + } +} diff --git a/migrations/Version20250320001428.php b/migrations/Version20250320001428.php new file mode 100644 index 0000000000000000000000000000000000000000..cba08978371af6bd9710b73c55e77135aa597486 --- /dev/null +++ b/migrations/Version20250320001428.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320001428 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EFECA7547'); + $this->addSql('DROP INDEX UNIQ_1F1B251EFECA7547 ON item'); + $this->addSql('ALTER TABLE item DROP purchase_proof_id'); + $this->addSql('ALTER TABLE purchase_proof ADD item_id INT NOT NULL'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_2F32C3F7126F525E ON purchase_proof (item_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item ADD purchase_proof_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EFECA7547 FOREIGN KEY (purchase_proof_id) REFERENCES purchase_proof (id) ON UPDATE NO ACTION ON DELETE NO ACTION'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1F1B251EFECA7547 ON item (purchase_proof_id)'); + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP INDEX UNIQ_2F32C3F7126F525E ON purchase_proof'); + $this->addSql('ALTER TABLE purchase_proof DROP item_id'); + } +} diff --git a/migrations/Version20250320001458.php b/migrations/Version20250320001458.php new file mode 100644 index 0000000000000000000000000000000000000000..345d1e8fff4725016aa11fe221db9d4b238d557b --- /dev/null +++ b/migrations/Version20250320001458.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320001458 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE item (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE purchase_proof (id INT AUTO_INCREMENT NOT NULL, item_id INT NOT NULL, congrats_text VARCHAR(255) NOT NULL, image_path VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2F32C3F7126F525E (item_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP TABLE item'); + $this->addSql('DROP TABLE purchase_proof'); + $this->addSql('DROP TABLE messenger_messages'); + } +} diff --git a/migrations/Version20250320001931.php b/migrations/Version20250320001931.php new file mode 100644 index 0000000000000000000000000000000000000000..acff107589c2946865e9553b323abe1c9c92a2f0 --- /dev/null +++ b/migrations/Version20250320001931.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320001931 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EFECA7547'); + $this->addSql('DROP INDEX UNIQ_1F1B251EFECA7547 ON item'); + $this->addSql('ALTER TABLE item DROP purchase_proof_id'); + $this->addSql('ALTER TABLE purchase_proof ADD item_id INT NOT NULL'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_2F32C3F7126F525E ON purchase_proof (item_id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE item ADD purchase_proof_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EFECA7547 FOREIGN KEY (purchase_proof_id) REFERENCES purchase_proof (id) ON UPDATE NO ACTION ON DELETE NO ACTION'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_1F1B251EFECA7547 ON item (purchase_proof_id)'); + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP INDEX UNIQ_2F32C3F7126F525E ON purchase_proof'); + $this->addSql('ALTER TABLE purchase_proof DROP item_id'); + } +} diff --git a/migrations/Version20250320001951.php b/migrations/Version20250320001951.php new file mode 100644 index 0000000000000000000000000000000000000000..97040f22cc3d7365c65735023a7aff1bf11a0792 --- /dev/null +++ b/migrations/Version20250320001951.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320001951 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE item (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE purchase_proof (id INT AUTO_INCREMENT NOT NULL, item_id INT NOT NULL, congrats_text VARCHAR(255) NOT NULL, image_path VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2F32C3F7126F525E (item_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP TABLE item'); + $this->addSql('DROP TABLE purchase_proof'); + $this->addSql('DROP TABLE messenger_messages'); + } +} diff --git a/migrations/Version20250320002407.php b/migrations/Version20250320002407.php new file mode 100644 index 0000000000000000000000000000000000000000..57bc4aedc90dc687ee23f0b3a9331494c5fca01a --- /dev/null +++ b/migrations/Version20250320002407.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; +use Doctrine\Migrations\AbstractMigration; + +/** + * Auto-generated Migration: Please modify to your needs! + */ +final class Version20250320002407 extends AbstractMigration +{ + public function getDescription(): string + { + return ''; + } + + public function up(Schema $schema): void + { + // this up() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE TABLE item (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, price DOUBLE PRECISION NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE purchase_proof (id INT AUTO_INCREMENT NOT NULL, item_id INT NOT NULL, congrats_text VARCHAR(255) NOT NULL, image_path VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2F32C3F7126F525E (item_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', available_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', delivered_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + $this->addSql('ALTER TABLE purchase_proof ADD CONSTRAINT FK_2F32C3F7126F525E FOREIGN KEY (item_id) REFERENCES item (id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE purchase_proof DROP FOREIGN KEY FK_2F32C3F7126F525E'); + $this->addSql('DROP TABLE item'); + $this->addSql('DROP TABLE purchase_proof'); + $this->addSql('DROP TABLE messenger_messages'); + } +} diff --git a/public/css/style.css b/public/css/style.css index dfb0f6041c52d81d79290a54c8a255f5a20bbef3..5ecfcbfbf8436273985bd1961d6ec24addfefc86 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -97,4 +97,73 @@ h1 a { justify-content: center; align-items: center; } +/* Add these styles to your existing CSS file */ + +.container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 20px; + height: 100%; +} + +.item-section { + display: flex; + gap: 20px; + justify-content: center; + align-items: center; + width: 100%; +} + +.article-box, .upload-box { + border: 2px solid #99CC33; + padding: 20px; + background: white; + width: 200px; + text-align: center; + position: relative; + border-radius: 10px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.upload-form { + display: flex; + flex-direction: column; + gap: 10px; + width: 100%; +} + +.form-group { + display: flex; + flex-direction: column; + gap: 5px; + width: 100%; +} + +.form-control { + padding: 8px; + border: 1px solid #99CC33; + border-radius: 5px; + outline: none; + width: 100%; +} + +.submit-button { + padding: 10px; + background-color: #00B8DE; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + font-size: 16px; + width: 100%; +} + +.submit-button:hover { + background-color: #0099B8; +} diff --git a/public/uploads/images/screenshot-from-2025-02-14-09-20-02-67db63d057533675522937.png b/public/uploads/images/screenshot-from-2025-02-14-09-20-02-67db63d057533675522937.png new file mode 100644 index 0000000000000000000000000000000000000000..142942288002c6363e8e11582cefeea2a3d1cd92 Binary files /dev/null and b/public/uploads/images/screenshot-from-2025-02-14-09-20-02-67db63d057533675522937.png differ diff --git a/src/Controller/PurchaseProofController.php b/src/Controller/PurchaseProofController.php new file mode 100644 index 0000000000000000000000000000000000000000..b31218ca477fe2796c7a6f2ed10ec3a68d090783 --- /dev/null +++ b/src/Controller/PurchaseProofController.php @@ -0,0 +1,50 @@ +<?php + +namespace App\Controller; + +use App\Entity\Item; +use App\Entity\PurchaseProof; +use App\Form\PurchaseProofType; +use Doctrine\ORM\EntityManagerInterface; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Annotation\Route; + +#[Route('/item/{id}/purchaseproof')] +class PurchaseProofController extends AbstractController +{ + #[Route('/new', name: 'purchaseproof_new', methods: ['GET', 'POST'])] + public function new(Item $item, Request $request, EntityManagerInterface $entityManager): Response + { + if ($item->getPurchaseProof()) { + $this->addFlash('warning', 'This item already has a purchase proof.'); + return $this->redirectToRoute('app_item_show', ['id' => $item->getId()]); + } + + $purchaseProof = new PurchaseProof(); + $purchaseProof->setItem($item); + + $form = $this->createForm(PurchaseProofType::class, $purchaseProof); + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $imageFile = $form->get('imagePath')->getData(); + if ($imageFile) { + $newFilename = uniqid().'.'.$imageFile->guessExtension(); + $imageFile->move($this->getParameter('uploads_directory'), $newFilename); + $purchaseProof->setImagePath($newFilename); + } + + $entityManager->persist($purchaseProof); + $entityManager->flush(); + + return $this->redirectToRoute('app_item_show', ['id' => $item->getId()]); + } + + return $this->render('purchase_proof/new.html.twig', [ + 'form' => $form->createView(), + 'item' => $item, + ]); + } +} diff --git a/src/Entity/Item.php b/src/Entity/Item.php index 99263f3324512810c625789913586b9bacf24b3f..7b6dba68030b825aa0c309bc95bfdd3eb5914bae 100644 --- a/src/Entity/Item.php +++ b/src/Entity/Item.php @@ -39,7 +39,7 @@ class Item #[ORM\Column] private ?float $price = null; - #[ORM\OneToOne(cascade: ['persist', 'remove'])] + #[ORM\OneToOne(mappedBy: 'item', cascade: ['persist', 'remove'])] private ?PurchaseProof $purchaseProof = null; public function getId(): ?int @@ -119,7 +119,11 @@ class Item public function setPurchaseProof(?PurchaseProof $purchaseProof): static { + // Ensure the relationship is bidirectional + if ($purchaseProof !== null && $purchaseProof->getItem() !== $this) { + $purchaseProof->setItem($this); + } $this->purchaseProof = $purchaseProof; return $this; } -} +} \ No newline at end of file diff --git a/src/Entity/PurchaseProof.php b/src/Entity/PurchaseProof.php index 1315adad75e51a5c393f33c7ecee0021c7b56440..cbaf858b9f0fc716eb976dea7fb9dce980cb3e3b 100644 --- a/src/Entity/PurchaseProof.php +++ b/src/Entity/PurchaseProof.php @@ -19,6 +19,13 @@ class PurchaseProof #[ORM\Column(length: 255)] private ?string $imagePath = null; + #[ORM\OneToOne(inversedBy: "purchaseProof", cascade: ["persist", "remove"])] + #[ORM\JoinColumn(nullable: false)] + private ?Item $item = null; + + #[ORM\Column] + private ?int $item_id = null; // Explicit item_id column + public function getId(): ?int { return $this->id; @@ -32,7 +39,6 @@ class PurchaseProof public function setCongratsText(string $congratsText): static { $this->congratsText = $congratsText; - return $this; } @@ -44,7 +50,29 @@ class PurchaseProof public function setImagePath(string $imagePath): static { $this->imagePath = $imagePath; + return $this; + } + + public function getItem(): ?Item + { + return $this->item; + } + public function setItem(Item $item): static + { + $this->item = $item; + $this->item_id = $item->getId(); // Keep item_id in sync + return $this; + } + + public function getItemId(): ?int + { + return $this->item_id; + } + + public function setItemId(int $item_id): static + { + $this->item_id = $item_id; return $this; } -} +} \ No newline at end of file diff --git a/src/Form/PurchaseProofType.php b/src/Form/PurchaseProofType.php new file mode 100644 index 0000000000000000000000000000000000000000..bc22634d4ae3d520aa9f7ae0a5b24ea1c81bf26a --- /dev/null +++ b/src/Form/PurchaseProofType.php @@ -0,0 +1,45 @@ +<?php + +namespace App\Form; + +use App\Entity\PurchaseProof; +use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\FileType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\Form\Extension\Core\Type\TextType; +use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Symfony\Component\Validator\Constraints\File; + +class PurchaseProofType extends AbstractType +{ + public function buildForm(FormBuilderInterface $builder, array $options) + { + $builder + ->add('congratsText', TextType::class, [ + 'label' => 'Congratulations Message' + ]) + ->add('imagePath', FileType::class, [ + 'label' => 'Upload Image', + 'mapped' => false, + 'required' => false, + 'constraints' => [ + new File([ + 'maxSize' => '5M', + 'mimeTypes' => ['image/jpeg', 'image/png', 'image/webp'], + 'mimeTypesMessage' => 'Please upload a valid image file', + ]) + ] + ]) + ->add('save', SubmitType::class, [ + 'label' => 'Save Purchase Proof' + ]); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => PurchaseProof::class, + ]); + } +} diff --git a/templates/purchase_proof/index.html.twig b/templates/purchase_proof/index.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..78a3a987919b26ade9149cb4a5d0d62182495d6b --- /dev/null +++ b/templates/purchase_proof/index.html.twig @@ -0,0 +1,20 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hello PurchaseProofController!{% endblock %} + +{% block body %} +<style> + .example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; } + .example-wrapper code { background: #F5F5F5; padding: 2px 6px; } +</style> + +<div class="example-wrapper"> + <h1>Hello {{ controller_name }}! ✅</h1> + + This friendly message is coming from: + <ul> + <li>Your controller at <code>/home/firas/Desktop/Wishlist-application/src/Controller/PurchaseProofController.php</code></li> + <li>Your template at <code>/home/firas/Desktop/Wishlist-application/templates/purchase_proof/index.html.twig</code></li> + </ul> +</div> +{% endblock %} diff --git a/templates/purchase_proof/new.html.twig b/templates/purchase_proof/new.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d56226013632ab9926e4b3452034caf099ec197d --- /dev/null +++ b/templates/purchase_proof/new.html.twig @@ -0,0 +1,40 @@ +{% extends 'base.html.twig' %} + +{% block title %}Add Purchase Proof{% endblock %} + +{% block body %} +<header> + <div class="user-icon"></div> + <h1><a href="#">Purchase proof</a></h1> + <input type="text" placeholder="Search…" class="search-bar"> + <div class="menu-icon"></div> +</header> + +<main> + <div class="container"> + <h2>Add Purchase Proof for {{ item.title }}</h2> + <section class="item-section"> + <div class="article-box"> + <p class="label">{{ item.title }}</p> + <div class="image-box"> + <img src="{{ asset('uploads/' ~ item.image) }}" alt="Item photo"> + </div> + </div> + + <div class="upload-box"> + {{ form_start(form, {'attr': {'enctype': 'multipart/form-data', 'class': 'upload-form'}}) }} + <div class="form-group"> + {{ form_label(form.congratsText) }} + {{ form_widget(form.congratsText, {'attr': {'class': 'form-control', 'placeholder': 'Write a message…'}}) }} + </div> + <div class="form-group"> + {{ form_label(form.imagePath) }} + {{ form_widget(form.imagePath, {'attr': {'class': 'form-control'}}) }} + </div> + <button type="submit" class="submit-button">Submit</button> + {{ form_end(form) }} + </div> + </section> + </div> +</main> +{% endblock %} \ No newline at end of file diff --git a/tests/Controller/PurchaseProofControllerTest.php b/tests/Controller/PurchaseProofControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..17136da85de3671d50c78896385e3180597a469b --- /dev/null +++ b/tests/Controller/PurchaseProofControllerTest.php @@ -0,0 +1,16 @@ +<?php + +namespace App\Tests\Controller; + +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; + +final class PurchaseProofControllerTest extends WebTestCase +{ + public function testIndex(): void + { + $client = static::createClient(); + $client->request('GET', '/purchase/proof'); + + self::assertResponseIsSuccessful(); + } +}