From 307181e03dc7ed360890a279e00c59ef098510b0 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Wed, 18 Jul 2018 14:48:22 -0400 Subject: [PATCH] Simplify dependencies --- composer.json | 12 +-- composer.lock | 73 +------------------ config/bundles.php | 7 +- config/packages/dev/monolog.yaml | 2 +- config/packages/prod/monolog.yaml | 2 +- config/packages/sensio_framework_extra.yaml | 3 - config/packages/test/monolog.yaml | 7 ++ src/Repository/CameraRepository.php | 4 +- src/Repository/FlashRepository.php | 4 +- src/Repository/LensesRepository.php | 4 +- .../PreviouslyOwnedFlashControllerTest.php | 55 -------------- symfony.lock | 23 +++--- 12 files changed, 30 insertions(+), 166 deletions(-) delete mode 100644 config/packages/sensio_framework_extra.yaml create mode 100644 config/packages/test/monolog.yaml delete mode 100644 src/Tests/Controller/PreviouslyOwnedFlashControllerTest.php diff --git a/composer.json b/composer.json index e3cd8f9..02b3ff2 100644 --- a/composer.json +++ b/composer.json @@ -3,20 +3,10 @@ "license": "proprietary", "require": { "php": "^7.2.0", - "doctrine/doctrine-bundle": "^1.6", - "doctrine/orm": "^2.5", - "sensio/framework-extra-bundle": "^5.1", - "symfony/console": "^4.0", - "symfony/debug-bundle": "^4.0", "symfony/debug-pack": "^1.0", "symfony/form": "^4.0", - "symfony/framework-bundle": "^4.0", "symfony/maker-bundle": "^1.0", - "symfony/monolog-bundle": "^3.1", - "symfony/orm-pack": "^1.0", - "symfony/twig-bundle": "^4.0", - "symfony/yaml": "^4.0", - "twig/twig": "^2.0 || ^3.0" + "symfony/orm-pack": "^1.0" }, "require-dev": { "symfony/flex": "^1.0", diff --git a/composer.lock b/composer.lock index 11fac42..89b7cb7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c45658330a726b8a2e60f60143bb93b0", + "content-hash": "88c714a6bc903ca05f5c8e9220b78a27", "packages": [ { "name": "doctrine/annotations", @@ -1707,77 +1707,6 @@ ], "time": "2017-10-23T01:57:42+00:00" }, - { - "name": "sensio/framework-extra-bundle", - "version": "v5.2.0", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "50e8b7292425957b8fd66887504430c89bcbd83c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/50e8b7292425957b8fd66887504430c89bcbd83c", - "reference": "50e8b7292425957b8fd66887504430c89bcbd83c", - "shasum": "" - }, - "require": { - "doctrine/common": "^2.2", - "symfony/config": "^3.3|^4.0", - "symfony/dependency-injection": "^3.3|^4.0", - "symfony/framework-bundle": "^3.4|^4.0", - "symfony/http-kernel": "^3.3|^4.0" - }, - "require-dev": { - "doctrine/doctrine-bundle": "^1.6", - "doctrine/orm": "^2.5", - "symfony/browser-kit": "^3.3|^4.0", - "symfony/dom-crawler": "^3.3|^4.0", - "symfony/expression-language": "^3.3|^4.0", - "symfony/finder": "^3.3|^4.0", - "symfony/monolog-bridge": "^3.0|^4.0", - "symfony/monolog-bundle": "^3.2", - "symfony/phpunit-bridge": "^3.3|^4.0", - "symfony/psr-http-message-bridge": "^0.3", - "symfony/security-bundle": "^3.3|^4.0", - "symfony/twig-bundle": "^3.3|^4.0", - "symfony/yaml": "^3.3|^4.0", - "twig/twig": "~1.12|~2.0", - "zendframework/zend-diactoros": "^1.3" - }, - "suggest": { - "symfony/expression-language": "", - "symfony/psr-http-message-bridge": "To use the PSR-7 converters", - "symfony/security-bundle": "" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "5.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Sensio\\Bundle\\FrameworkExtraBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "This bundle provides a way to configure your controllers with annotations", - "keywords": [ - "annotations", - "controllers" - ], - "time": "2018-05-12T09:37:42+00:00" - }, { "name": "symfony/cache", "version": "v4.1.1", diff --git a/config/bundles.php b/config/bundles.php index 31f38cc..b4245b2 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -4,12 +4,11 @@ return [ App\App::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true], - Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], - Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], - Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], - Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], + Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], + Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], + Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], ]; diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml index 3662592..b1998da 100644 --- a/config/packages/dev/monolog.yaml +++ b/config/packages/dev/monolog.yaml @@ -14,6 +14,6 @@ monolog: # type: chromephp # level: info console: - type: console + type: console process_psr_3_messages: false channels: ["!event", "!doctrine", "!console"] diff --git a/config/packages/prod/monolog.yaml b/config/packages/prod/monolog.yaml index 90e1a4c..1677234 100644 --- a/config/packages/prod/monolog.yaml +++ b/config/packages/prod/monolog.yaml @@ -12,6 +12,6 @@ monolog: path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug console: - type: console + type: console process_psr_3_messages: false channels: ["!event", "!doctrine"] diff --git a/config/packages/sensio_framework_extra.yaml b/config/packages/sensio_framework_extra.yaml deleted file mode 100644 index bc400a1..0000000 --- a/config/packages/sensio_framework_extra.yaml +++ /dev/null @@ -1,3 +0,0 @@ -sensio_framework_extra: - router: - annotations: false diff --git a/config/packages/test/monolog.yaml b/config/packages/test/monolog.yaml new file mode 100644 index 0000000..2762653 --- /dev/null +++ b/config/packages/test/monolog.yaml @@ -0,0 +1,7 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: ["!event"] diff --git a/src/Repository/CameraRepository.php b/src/Repository/CameraRepository.php index 3a32743..a9d2928 100644 --- a/src/Repository/CameraRepository.php +++ b/src/Repository/CameraRepository.php @@ -15,7 +15,7 @@ class CameraRepository extends EntityRepository { * @param Camera $currentRecord * @throws ORMInvalidArgumentException */ - public function deacquire(Camera $currentRecord) + public function deacquire(Camera $currentRecord): void { $currentRecord->setFormerlyOwned(true) ->setReceived(true); @@ -27,7 +27,7 @@ class CameraRepository extends EntityRepository { * @param PreviouslyOwnedCamera $currentRecord * @throws ORMInvalidArgumentException */ - public function reacquire(PreviouslyOwnedCamera $currentRecord) + public function reacquire(PreviouslyOwnedCamera $currentRecord): void { $currentRecord->setFormerlyOwned(false); diff --git a/src/Repository/FlashRepository.php b/src/Repository/FlashRepository.php index 2f54166..a6635ca 100644 --- a/src/Repository/FlashRepository.php +++ b/src/Repository/FlashRepository.php @@ -15,7 +15,7 @@ class FlashRepository extends EntityRepository { * @param Flash $currentRecord * @throws ORMInvalidArgumentException */ - public function deacquire(Flash $currentRecord) + public function deacquire(Flash $currentRecord): void { $currentRecord->setFormerlyOwned(true) ->setReceived(true); @@ -27,7 +27,7 @@ class FlashRepository extends EntityRepository { * @param PreviouslyOwnedFlash $currentRecord * @throws ORMInvalidArgumentException */ - public function reacquire(PreviouslyOwnedFlash $currentRecord) + public function reacquire(PreviouslyOwnedFlash $currentRecord): void { $currentRecord->setFormerlyOwned(false); diff --git a/src/Repository/LensesRepository.php b/src/Repository/LensesRepository.php index 2af3652..e6dff27 100644 --- a/src/Repository/LensesRepository.php +++ b/src/Repository/LensesRepository.php @@ -12,7 +12,7 @@ class LensesRepository extends EntityRepository /** * @param Lenses $currentRecord */ - public function deacquire(Lenses $currentRecord) + public function deacquire(Lenses $currentRecord): void { $currentRecord->setFormerlyOwned(true) ->setReceived(true); @@ -23,7 +23,7 @@ class LensesRepository extends EntityRepository /** * @param PreviouslyOwnedLenses $currentRecord */ - public function reacquire(PreviouslyOwnedLenses $currentRecord) + public function reacquire(PreviouslyOwnedLenses $currentRecord): void { $currentRecord->setFormerlyOwned(false); diff --git a/src/Tests/Controller/PreviouslyOwnedFlashControllerTest.php b/src/Tests/Controller/PreviouslyOwnedFlashControllerTest.php deleted file mode 100644 index 78737a8..0000000 --- a/src/Tests/Controller/PreviouslyOwnedFlashControllerTest.php +++ /dev/null @@ -1,55 +0,0 @@ -request('GET', '/previously-owned-flash/'); - $this->assertEquals(200, $client->getResponse()->getStatusCode(), "Unexpected HTTP status code for GET /previously-owned-flash/"); - $crawler = $client->click($crawler->selectLink('Create a new entry')->link()); - - // Fill in the form and submit it - $form = $crawler->selectButton('Create')->form(array( - 'camerabundle_previouslyownedflash[field_name]' => 'Test', - // ... other fields to fill - )); - - $client->submit($form); - $crawler = $client->followRedirect(); - - // Check data in the show view - $this->assertGreaterThan(0, $crawler->filter('td:contains("Test")')->count(), 'Missing element td:contains("Test")'); - - // Edit the entity - $crawler = $client->click($crawler->selectLink('Edit')->link()); - - $form = $crawler->selectButton('Update')->form(array( - 'camerabundle_previouslyownedflash[field_name]' => 'Foo', - // ... other fields to fill - )); - - $client->submit($form); - $crawler = $client->followRedirect(); - - // Check the element contains an attribute with value equals "Foo" - $this->assertGreaterThan(0, $crawler->filter('[value="Foo"]')->count(), 'Missing element [value="Foo"]'); - - // Delete the entity - $client->submit($crawler->selectButton('Delete')->form()); - $crawler = $client->followRedirect(); - - // Check the entity has been delete on the list - $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent()); - } - - */ -} diff --git a/symfony.lock b/symfony.lock index 2b53c66..7d196ea 100644 --- a/symfony.lock +++ b/symfony.lock @@ -101,9 +101,6 @@ "psr/simple-cache": { "version": "1.0.0" }, - "sensio/framework-extra-bundle": { - "version": "v3.0.28" - }, "symfony/cache": { "version": "v3.3.13" }, @@ -123,16 +120,16 @@ "version": "v3.3.13" }, "symfony/debug-bundle": { - "version": "3.3", + "version": "4.1", "recipe": { "repo": "github.com/symfony/recipes", "branch": "master", - "version": "3.3", - "ref": "de31e687f3964939abd1f66817bd96ed34bc2eee" + "version": "4.1", + "ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea" } }, "symfony/debug-pack": { - "version": "v1.0.3" + "version": "v1.0.5" }, "symfony/dependency-injection": { "version": "v3.3.13" @@ -195,7 +192,7 @@ } }, "symfony/monolog-bridge": { - "version": "v4.0.0" + "version": "v4.1.1" }, "symfony/monolog-bundle": { "version": "3.1", @@ -203,7 +200,7 @@ "repo": "github.com/symfony/recipes", "branch": "master", "version": "3.1", - "ref": "c24944bd87dacf0bb8fa218dc21e4a70fff56882" + "ref": "51b7a31438c8aeeda7931a0ece98a945c91e7f20" } }, "symfony/options-resolver": { @@ -222,10 +219,10 @@ "version": "v1.6.0" }, "symfony/polyfill-php72": { - "version": "v1.6.0" + "version": "v1.8.0" }, "symfony/profiler-pack": { - "version": "v1.0.2" + "version": "v1.0.3" }, "symfony/property-access": { "version": "v4.0.0" @@ -240,7 +237,7 @@ } }, "symfony/stopwatch": { - "version": "v4.0.0" + "version": "v4.1.1" }, "symfony/twig-bridge": { "version": "v4.0.0" @@ -255,7 +252,7 @@ } }, "symfony/var-dumper": { - "version": "v4.0.0" + "version": "v4.1.1" }, "symfony/web-profiler-bundle": { "version": "3.3",