diff --git a/.gitattributes b/.gitattributes index c47225a..8046f94 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,15 +1,13 @@ -.editorconfig export-ignore -.gitattributes export-ignore -/.github/ export-ignore -.gitignore export-ignore -/.php_cs export-ignore -/.scrutinizer.yml export-ignore -/.styleci.yml export-ignore -/.travis.yml export-ignore -/behat.yml.dist export-ignore -/features/ export-ignore -/phpspec.ci.yml export-ignore -/phpspec.yml.dist export-ignore -/phpunit.xml.dist export-ignore -/spec/ export-ignore -/tests/ export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +/.github/ export-ignore +.gitignore export-ignore +/.php-cs-fixer.php export-ignore +/CHANGELOG.md export-ignore +/CODE_OF_CONDUCT.md export-ignore +/CONTRIBUTING.md export-ignore +/doc export-ignore +/phpstan.neon.dist export-ignore +/phpstan-baseline.neon export-ignore +/phpunit.xml.dist export-ignore +/tests/ export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfb1cf1..df19993 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,13 +62,8 @@ jobs: fail-fast: true matrix: dependencies: ['highest'] - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['7.4', '8.0', '8.1', '8.2', '8.3'] include: - - php: '7.4' - sf_version: '4.4.*' - dependencies: 'lowest' - - php: '7.4' - sf_version: '4.4.*' - php: '7.4' sf_version: '5.4.*' dependencies: 'lowest' @@ -76,16 +71,20 @@ jobs: sf_version: '5.4.*' - php: '8.1' sf_version: '5.4.*' - - php: '8.0' - sf_version: '6.0.*' - - php: '8.1' - sf_version: '6.0.*' - php: '8.2' - sf_version: '6.2.*' + sf_version: '5.4.*' + - php: '8.3' + sf_version: '5.4.*' + - php: '8.1' + sf_version: '6.4.*' - php: '8.2' sf_version: '6.4.*' + - php: '8.3' + sf_version: '6.4.*' - php: '8.2' sf_version: '7.0.*' + - php: '8.3' + sf_version: '7.0.*' steps: - name: "Setup PHP" uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 2cba9b9..a262826 100644 --- a/composer.json +++ b/composer.json @@ -15,9 +15,9 @@ "geocoder-php/plugin": "^1.5", "php-http/curl-client": "^2.3", "php-http/discovery": "^1.14", - "symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0", - "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0", - "symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", "willdurand/geocoder": "^4.6" }, "require-dev": { @@ -63,11 +63,11 @@ "php-http/message": "^1.13", "phpstan/phpstan": "^1.9.2", "psr/http-client": "^1.0", - "symfony/cache": "^4.4 || ^5.0 || ^6.0 || ^7.0", - "symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0", - "symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0", - "symfony/validator": "^4.4 || ^5.0 || ^6.0 || ^7.0", - "symfony/yaml": "^4.4 || ^5.0 || ^6.0 || ^7.0" + "symfony/cache": "^5.4 || ^6.0 || ^7.0", + "symfony/config": "^5.4 || ^6.0 || ^7.0", + "symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0", + "symfony/validator": "^5.4 || ^6.0 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "conflict": { "geocoder-php/nominatim-provider": "<5.0" diff --git a/tests/Functional/BundleInitializationTest.php b/tests/Functional/BundleInitializationTest.php index c393c77..15787b6 100644 --- a/tests/Functional/BundleInitializationTest.php +++ b/tests/Functional/BundleInitializationTest.php @@ -13,7 +13,6 @@ namespace Bazinga\GeocoderBundle\Tests\Functional; use Bazinga\GeocoderBundle\BazingaGeocoderBundle; -use Bazinga\GeocoderBundle\Tests\PublicServicePass; use Geocoder\Dumper\GeoArray; use Geocoder\Dumper\GeoJson; use Geocoder\Dumper\Gpx; @@ -44,8 +43,6 @@ protected static function createKernel(array $options = []): KernelInterface */ $kernel = parent::createKernel($options); $kernel->addTestBundle(BazingaGeocoderBundle::class); - $kernel->addTestCompilerPass(new PublicServicePass('|[Bb]azinga:*|')); - $kernel->addTestCompilerPass(new PublicServicePass('|[gG]eocoder:*|')); $kernel->handleOptions($options); return $kernel; diff --git a/tests/Functional/GeocoderListenerTest.php b/tests/Functional/GeocoderListenerTest.php index 3d42e85..c874d02 100644 --- a/tests/Functional/GeocoderListenerTest.php +++ b/tests/Functional/GeocoderListenerTest.php @@ -17,7 +17,6 @@ use Bazinga\GeocoderBundle\Tests\Functional\Fixtures\Entity\DummyWithGetter; use Bazinga\GeocoderBundle\Tests\Functional\Fixtures\Entity\DummyWithInvalidGetter; use Bazinga\GeocoderBundle\Tests\Functional\Fixtures\Entity\DummyWithProperty; -use Bazinga\GeocoderBundle\Tests\PublicServicePass; use Doctrine\Bundle\DoctrineBundle\ConnectionFactory; use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; use Doctrine\ORM\Tools\SchemaTool; @@ -56,8 +55,6 @@ protected static function createKernel(array $options = []): KernelInterface $kernel = parent::createKernel($options); $kernel->addTestBundle(DoctrineBundle::class); $kernel->addTestBundle(BazingaGeocoderBundle::class); - $kernel->addTestCompilerPass(new PublicServicePass('|[Bb]azinga:*|')); - $kernel->addTestCompilerPass(new PublicServicePass('|[gG]eocoder:*|')); if (defined(ConnectionFactory::class.'::DEFAULT_SCHEME_MAP')) { $kernel->addTestConfig(static function (ContainerBuilder $container) { $container->prependExtensionConfig('doctrine', [ diff --git a/tests/Functional/PluginInteractionTest.php b/tests/Functional/PluginInteractionTest.php index 2164cd6..4f23d14 100644 --- a/tests/Functional/PluginInteractionTest.php +++ b/tests/Functional/PluginInteractionTest.php @@ -13,7 +13,6 @@ namespace Bazinga\GeocoderBundle\Tests\Functional; use Bazinga\GeocoderBundle\BazingaGeocoderBundle; -use Bazinga\GeocoderBundle\Tests\PublicServicePass; use Geocoder\Query\GeocodeQuery; use Nyholm\BundleTest\TestKernel; use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; @@ -36,8 +35,6 @@ protected static function createKernel(array $options = []): KernelInterface */ $kernel = parent::createKernel($options); $kernel->addTestBundle(BazingaGeocoderBundle::class); - $kernel->addTestCompilerPass(new PublicServicePass('|[Bb]azinga:*|')); - $kernel->addTestCompilerPass(new PublicServicePass('|[gG]eocoder:*|')); $kernel->handleOptions($options); return $kernel; diff --git a/tests/Functional/ProviderFactoryTest.php b/tests/Functional/ProviderFactoryTest.php index cee7666..effa3e8 100644 --- a/tests/Functional/ProviderFactoryTest.php +++ b/tests/Functional/ProviderFactoryTest.php @@ -13,7 +13,6 @@ namespace Bazinga\GeocoderBundle\Tests\Functional; use Bazinga\GeocoderBundle\BazingaGeocoderBundle; -use Bazinga\GeocoderBundle\Tests\PublicServicePass; use Geocoder\Provider\AlgoliaPlaces\AlgoliaPlaces; use Geocoder\Provider\ArcGISOnline\ArcGISOnline; use Geocoder\Provider\BingMaps\BingMaps; @@ -64,8 +63,6 @@ protected static function createKernel(array $options = []): KernelInterface */ $kernel = parent::createKernel($options); $kernel->addTestBundle(BazingaGeocoderBundle::class); - $kernel->addTestCompilerPass(new PublicServicePass('|[Bb]azinga:*|')); - $kernel->addTestCompilerPass(new PublicServicePass('|[gG]eocoder:*|')); $kernel->handleOptions($options); return $kernel; diff --git a/tests/PublicServicePass.php b/tests/PublicServicePass.php deleted file mode 100644 index 8f430b6..0000000 --- a/tests/PublicServicePass.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * @internal - * - * Note: this can be removed when we'll support only Symfony >5.3 - */ -final class PublicServicePass implements CompilerPassInterface -{ - private string $regex; - - public function __construct(string $regex = '|.*|') - { - $this->regex = $regex; - } - - public function process(ContainerBuilder $container) - { - foreach ($container->getDefinitions() as $id => $definition) { - if (preg_match($this->regex, $id)) { - $definition->setPublic(true); - } - } - - foreach ($container->getAliases() as $id => $alias) { - if (preg_match($this->regex, $id)) { - $alias->setPublic(true); - } - } - } -}