From a6721149d865eac375ebcbabf53472984fb27168 Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Tue, 4 Jun 2024 02:50:30 +0300 Subject: [PATCH 1/5] Exclude vendor & cache from PHP_Codesniffer checks. --- phpcs.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpcs.xml b/phpcs.xml index 2b322b8..b6c7b4f 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -24,8 +24,10 @@ - /vendor/* /config/bundles.php + /tests/bootstrap.php + /var/* + /vendor/* . From 0e4dc9049fea5c64b0c3433d49ca5f971ed9f6bc Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Tue, 4 Jun 2024 02:53:31 +0300 Subject: [PATCH 2/5] Exclude vendor & cache from PHP-CS-Fixer checks. --- .php-cs-fixer.dist.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index f52fb7b..a558d66 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -6,7 +6,13 @@ use PhpCsFixer\Finder; $finder = Finder::create() - ->exclude('vendor') + ->exclude([ + 'var', + 'vendor', + ]) + ->notPath([ + 'tests/bootstrap.php', + ]) ->in(__DIR__) ; From 0f87b64dde3cf8c5d870e4e6452694da183bd3ee Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Tue, 4 Jun 2024 02:57:38 +0300 Subject: [PATCH 3/5] Remove redundant env vars. --- .env | 20 -------------------- .env.test | 2 -- 2 files changed, 22 deletions(-) diff --git a/.env b/.env index 4187c3d..e69de29 100644 --- a/.env +++ b/.env @@ -1,20 +0,0 @@ -# In all environments, the following files are loaded if they exist, -# the latter taking precedence over the former: -# -# * .env contains default values for the environment variables needed by the app -# * .env.local uncommitted file with local overrides -# * .env.$APP_ENV committed environment-specific defaults -# * .env.$APP_ENV.local uncommitted environment-specific overrides -# -# Real environment variables win over .env files. -# -# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. -# https://symfony.com/doc/current/configuration/secrets.html -# -# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). -# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration - -###> symfony/framework-bundle ### -APP_ENV=dev -APP_SECRET=74f6de3f7a6ba3a9ddc199911cadfc6b -###< symfony/framework-bundle ### diff --git a/.env.test b/.env.test index 7ed3dcd..a46e4cd 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,2 @@ -# define your env variables for the test env here KERNEL_CLASS='Invis1ble\SerializerExtensionBundle\Kernel' -APP_SECRET='$ecretf0rt3st' SYMFONY_DEPRECATIONS_HELPER=999999 From d9feac34e95c66fc792e3b21ee83c35e8e9611c3 Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Tue, 4 Jun 2024 02:58:22 +0300 Subject: [PATCH 4/5] Fix LICENSE. --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 4bf0ea4..46e68e9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Invis1ble. +Copyright (c) 2024 Invis1ble. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From da15bd1c602be82f1e8bffb21aac71edb140de9c Mon Sep 17 00:00:00 2001 From: Invis1ble Date: Tue, 4 Jun 2024 03:07:23 +0300 Subject: [PATCH 5/5] Remove symfony/dotenv from dependencies & refactor. --- .env | 0 .env.test | 2 -- .php-cs-fixer.dist.php | 3 --- composer.json | 3 +-- phpcs.xml | 1 - phpunit.xml.dist | 2 +- tests/bootstrap.php | 13 ------------- 7 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 .env delete mode 100644 .env.test delete mode 100644 tests/bootstrap.php diff --git a/.env b/.env deleted file mode 100644 index e69de29..0000000 diff --git a/.env.test b/.env.test deleted file mode 100644 index a46e4cd..0000000 --- a/.env.test +++ /dev/null @@ -1,2 +0,0 @@ -KERNEL_CLASS='Invis1ble\SerializerExtensionBundle\Kernel' -SYMFONY_DEPRECATIONS_HELPER=999999 diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index a558d66..eb32437 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -10,9 +10,6 @@ 'var', 'vendor', ]) - ->notPath([ - 'tests/bootstrap.php', - ]) ->in(__DIR__) ; diff --git a/composer.json b/composer.json index 7556f8c..d7e9c6c 100644 --- a/composer.json +++ b/composer.json @@ -34,8 +34,7 @@ "matthiasnoback/symfony-dependency-injection-test": "^5.0", "rector/rector": "dev-main", "symfony/framework-bundle": "<=7.0.7", - "symfony/test-pack": "^1.0", - "symfony/dotenv": "7.2.x-dev" + "symfony/test-pack": "^1.0" }, "autoload": { "psr-4": { diff --git a/phpcs.xml b/phpcs.xml index b6c7b4f..0628505 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -25,7 +25,6 @@ /config/bundles.php - /tests/bootstrap.php /var/* /vendor/* diff --git a/phpunit.xml.dist b/phpunit.xml.dist index baa3792..ebe3424 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,10 +4,10 @@ + diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 47a5855..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,13 +0,0 @@ -bootEnv(dirname(__DIR__).'/.env'); -} - -if ($_SERVER['APP_DEBUG']) { - umask(0000); -}