Skip to content

Commit

Permalink
Merge pull request #17 from retailcrm/sensio-support-remove
Browse files Browse the repository at this point in the history
Removed support of sensio/framework-extra-bundle
  • Loading branch information
muxx authored Sep 30, 2024
2 parents b72dfea + 45d1ed1 commit 5bad727
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 103 deletions.
32 changes: 0 additions & 32 deletions Extractor/Handler/SensioFrameworkExtraHandler.php

This file was deleted.

5 changes: 0 additions & 5 deletions Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

<parameter key="nelmio_api_doc.extractor.handler.fos_rest.class">Nelmio\ApiDocBundle\Extractor\Handler\FosRestHandler</parameter>
<parameter key="nelmio_api_doc.extractor.handler.jms_security.class">Nelmio\ApiDocBundle\Extractor\Handler\JmsSecurityExtraHandler</parameter>
<parameter key="nelmio_api_doc.extractor.handler.sensio_framework_extra.class">Nelmio\ApiDocBundle\Extractor\Handler\SensioFrameworkExtraHandler</parameter>
<parameter key="nelmio_api_doc.extractor.handler.phpdoc.class">Nelmio\ApiDocBundle\Extractor\Handler\PhpDocHandler</parameter>

<parameter key="nelmio_api_doc.parser.collection_parser.class">Nelmio\ApiDocBundle\Parser\CollectionParser</parameter>
Expand Down Expand Up @@ -53,10 +52,6 @@
<tag name="nelmio_api_doc.extractor.handler"/>
</service>

<service id="nelmio_api_doc.extractor.handler.sensio_framework_extra" class="%nelmio_api_doc.extractor.handler.sensio_framework_extra.class%" public="false">
<tag name="nelmio_api_doc.extractor.handler"/>
</service>

<service id="nelmio_api_doc.extractor.handler.phpdoc" class="%nelmio_api_doc.extractor.handler.phpdoc.class%" public="false">
<argument type="service" id="nelmio_api_doc.doc_comment_extractor" />
<tag name="nelmio_api_doc.extractor.handler"/>
Expand Down
1 change: 0 additions & 1 deletion Resources/doc/other-bundle-annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ This bundle will get information from the following other annotations:
(when strict parameter is true), ``filters`` (when strict is false)
* ``@JMS\SecurityExtraBundle\Annotation\Secure`` - set ``authentication`` to true,
``authenticationRoles`` to the given roles
* ``@Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache`` - set ``cache``

PHPDoc
------
Expand Down
13 changes: 0 additions & 13 deletions Tests/Extractor/ApiDocExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,6 @@ public function testGetWithAuthentication()
$this->assertCount(2, $annotation->getAuthenticationRoles());
}

public function testGetWithCache()
{
$container = $this->getContainer();
$extractor = $container->get('nelmio_api_doc.extractor.api_doc_extractor');
$annotation = $extractor->get('Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::zCachedAction', 'test_route_23');

$this->assertNotNull($annotation);
$this->assertEquals(
60,
$annotation->getCache()
);
}

public function testGetWithDeprecated()
{
$container = $this->getContainer();
Expand Down
39 changes: 0 additions & 39 deletions Tests/Extractor/Handler/SensioFrameworkExtraHandlerTest.php

This file was deleted.

6 changes: 0 additions & 6 deletions Tests/Fixtures/Controller/TestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@
use FOS\RestBundle\Controller\Annotations\RequestParam;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Nelmio\ApiDocBundle\Tests\Fixtures\DependencyTypePath;
use Nelmio\ApiDocBundle\Tests\Fixtures\RequestParamHelper;
use Nelmio\ApiDocBundle\Util\LegacyFormHelper;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Validator\Constraints as Assert;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;

class TestController
{
Expand Down Expand Up @@ -219,15 +215,13 @@ public function authenticatedAction()

/**
* @ApiDoc()
* @Cache(maxage=60, public=1)
*/
public function zCachedAction()
{
}

/**
* @ApiDoc()
* @Security("has_role('ROLE_USER')")
*/
public function zSecuredAction()
{
Expand Down
3 changes: 1 addition & 2 deletions Tests/Formatter/testFormat-result.php
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,6 @@
array (
'method' => 'POST',
'uri' => '/zcached',
'cache' => 60,
'https' => false,
'authentication' => false,
'authenticationRoles' =>
Expand All @@ -2618,7 +2617,7 @@
'method' => 'POST',
'uri' => '/zsecured',
'https' => false,
'authentication' => true,
'authentication' => false,
'authenticationRoles' =>
array (
),
Expand Down
3 changes: 1 addition & 2 deletions Tests/Formatter/testFormat-result_1.php
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,6 @@
array (
'method' => 'POST',
'uri' => '/zcached',
'cache' => 60,
'https' => false,
'authentication' => false,
'authenticationRoles' =>
Expand All @@ -2461,7 +2460,7 @@
'method' => 'POST',
'uri' => '/zsecured',
'https' => false,
'authentication' => true,
'authentication' => false,
'authenticationRoles' =>
array (
),
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"michelf/php-markdown": "~1.4"
},
"require-dev": {
"doctrine/annotations": "^1.0",
"friendsofsymfony/rest-bundle": "^3.7",
"jms/serializer": "~3.15.0",
"jms/serializer-bundle": "4.1.0",
"jms/serializer": "^3.15",
"jms/serializer-bundle": "^4.1|^5.4",
"phpunit/phpunit": "~9.5",
"sensio/framework-extra-bundle": "^6.2",
"symfony/asset": "^5.0|^6.0",
"symfony/browser-kit": "^5.0|^6.0",
"symfony/translation": "^5.0|^6.0",
Expand Down

0 comments on commit 5bad727

Please sign in to comment.