810 Commits

Author SHA1 Message Date
Guilhem Niot
5ed0d31294
Merge pull request #1954 from jackcutting/allow-complete-override-of-security
Allow global security policies to be removed
2022-02-01 16:11:57 +01:00
Thomas Picquet
f363eeef66 set value key 2022-01-28 07:40:09 -08:00
Thomas Picquet
5b51214765 styleci fix 2022-01-28 07:38:19 -08:00
Thomas Picquet
11f61af93b keep it BC 2022-01-28 07:37:28 -08:00
Thomas Picquet
ebde54f251 style fix 2022-01-28 07:34:08 -08:00
Thomas Picquet
53954031b5 Fixed Areas attribute to work like the documentation specifies 2022-01-28 07:30:39 -08:00
Jack Cutting
4bc12f1034 Add link to Security documentation to the Learn More section 2022-01-26 17:39:42 +00:00
Jack Cutting
9545a0ce52 Allow security policies to be removed using the Security annotation by passing it a name of null. 2022-01-26 17:33:35 +00:00
Guilhem Niot
1885d25cd9
Merge pull request #1948 from nelmio/GuilhemN-patch-2
Allow more versions of phpdocumentor/reflection-docblock
2022-01-10 17:10:58 +01:00
Guilhem Niot
4b9905fe8b Allow more versions of phpdocumentor/reflection-docblock 2022-01-10 17:10:13 +01:00
Guilhem Niot
3bc05aa6dc
Merge pull request #1949 from nelmio/FIXTESTS
Fix the tests
2022-01-10 17:09:09 +01:00
Guilhem Niot
e0b25e5580 zircote/swagger-php attributes were moved to Attributes namespace 2022-01-10 17:08:13 +01:00
Guilhem Niot
411cb4c27d Do not use open api version from api-platform 2022-01-10 16:50:49 +01:00
Guilhem Niot
43212d9b7e Context::getRootContext() was removed 2022-01-10 16:50:45 +01:00
Guilhem Niot
d14471d403
Merge pull request #1946 from nelmio/SWAGGERUI
Update Swagger-ui to version 4.1.3
2022-01-05 16:23:18 +01:00
Guilhem Niot
a928d69609
Merge pull request #1942 from sdaoudi/patch-1
Fixed minor typo
2022-01-05 16:22:44 +01:00
Guilhem Niot
c3525ec9c9 Update Swagger-ui to version 4.1.3 2022-01-05 16:18:00 +01:00
DAOUDI Soufian
49deb52322
Fixed minor type 2021-12-29 22:18:35 +01:00
Guilhem Niot
cc6731ae77
Merge pull request #1938 from magnetik/1937
Fixes symfony serializer being mandatory
2021-12-23 15:15:40 +01:00
Baptiste Lafontaine
a4e8de7a75 Fixes symfony serializer being mandatory 2021-12-23 14:13:06 +01:00
Guilhem Niot
16608de67f Merge branch '3.x' 2021-12-22 11:31:52 +01:00
Guilhem Niot
ced932b8e7
Test more PHP 8.1 attributes support (#1936)
* Test `@Areas` as a php 8.1 attribute

* Test `@Security` as PHP 8.1 attribute
2021-12-21 16:39:08 +01:00
Alex Kalineskou
cc97b0ba45
Add support for php attributes (#1932)
* Add support for php attributes

* Fix tests for php 8.1

* Simplify the annotations

* Revert the changes to the tests

* CS

* Test FOSRest parsing of attributes

* CS

* typo

* CS

* Test fetchArticle php 8.1 attributes

* Fix namespaces

Co-authored-by: Guilhem Niot <guilhem@gniot.fr>
2021-12-21 16:16:14 +01:00
Guilhem Niot
3d263a525d
Merge pull request #1933 from nelmio/SF6
Use an early version of Api-platform with symfony 6 support in one test case
2021-12-21 13:53:56 +01:00
Guilhem Niot
ab99b4bcb9 Fix api-platform routes import 2021-12-21 13:52:16 +01:00
Guilhem Niot
0fada289f5 Fix CS 2021-12-21 13:46:02 +01:00
Guilhem Niot
b4c74ee938 Fix retrieval of container in tests 2021-12-21 13:41:49 +01:00
Fabiano Roberto
e04521ebea Fix usage of configureRoutes in tests 2021-12-21 11:54:39 +01:00
Fabiano Roberto
2ade72d0aa feat(dependencies): #1913 - upgrade symfony 60 dependencies 2021-12-21 11:29:10 +01:00
Guilhem Niot
e15f3d272a Use an early version of Api-platform with symfony 6 support in one test case 2021-12-21 11:29:10 +01:00
Guilhem Niot
46822918a8
Merge pull request #1934 from nelmio/JMS4
Add support of JMS v4
2021-12-21 11:26:49 +01:00
Guilhem Niot
87e4183b9b Add support of JMS v4 2021-12-21 11:24:20 +01:00
Guilhem Niot
b399cb4c7e
fix tests 2021-12-19 11:41:36 +01:00
Guilhem Niot
ade4b6c17c
Merge branch 'master' into constraint_groups 2021-12-19 11:38:47 +01:00
Guilhem Niot
01807df254
Merge pull request #1928 from tgalopin/php81
Add PHP 8.1 in CI and better test supported Symfony minors
2021-12-19 11:31:53 +01:00
Titouan Galopin
736d7e8783 Add PHP 8.1 in CI and better test supported Symfony minors 2021-12-14 17:36:17 +01:00
Alexey Alshenetsky
7de49bb4a8
Add missing null check to ControllerReflector::getReflectionMethod (#1918)
* add null check

https://github.com/nelmio/NelmioApiDocBundle/issues/1909

* less code is better

* add tests for ControllerReflection::getReflectionMethod()

* lint fix

* style_ci fixes

Co-authored-by: Alexey <alshenestky@icloud.com>
2021-12-12 01:32:51 +01:00
jeremy
babf788636
Proposal: Add `header_block` Twig Block (#1896)
* Adding ``header_block`` Twig Block

In attempting to remove the default green header from the API docs (I am integrating the docs into a site that already has a header), I have found that the only possible way to do so is to overwrite the entire ``index.html.twig`` file.  This is because the existing ``{% header %}`` twig tags are placed *inside* the ``<header>`` HTML tags.  So, if one overrides the ``{% header %}`` block, it only adjusts the header content, as opposed to allowing control over the entire header object.

To resolve this problem I considered two methods:

- Move the existing ``{% header %}`` tags _*outside*_ of the ``<header>`` tags.  This would resolve the problem in the simplest fashion, but would be a breaking change for those currently overriding the block.

- Add a new twig block, placing its tags *_outside_* the existing ``<header>`` tags.  This would leave the existing functionality as-is, and would not break any current implementations.

I chose the latter for the reasons specified above, and suggested the name ``{% header_block %}``.  Thanks for considering this proposal.

* Add Location of Original Twig Template

This doc page advises that one can `have a look at the original template to see which blocks can be overridden`, but does not say where the original template can be found.  This edit adds that information so that users don't have to resort to searching for keywords (like I just had to).

Note that I haven't run any tests as this is a docs-only change.
2021-12-11 14:41:46 +01:00
Alexey Alshenetsky
14383f4ee5
Add support for zircore/swagger-php 4.0 (#1916)
* add zircore/swagger-php v4 to composer.json

* fix incompatibilities

* add compatibility with 3.2

* Apply fixes from StyleCI

* mark SetsContextTrait as internal

* Bump php version

Co-authored-by: Alexey <alshenestky@icloud.com>
Co-authored-by: Alexey Alshenetsky <alshenetsky@users.noreply.github.com>
Co-authored-by: Guilhem Niot <guilhem@gniot.fr>
2021-12-11 14:39:04 +01:00
Gemorroj
a041c69a0c
try fix #1876 (#1919) 2021-12-11 14:32:00 +01:00
Guilhem Niot
f5fb7a4088
Fix deprecations (#1924) 2021-12-11 14:22:14 +01:00
Guilhem Niot
a184cb8ef4
Fix deprecations (#1923) 2021-12-11 14:19:43 +01:00
Encre Informatique
4148dfda25
fixed : add doc blocks to silence Symfony deprecations (#1922)
* fixed : add doc blocks to silence Symfony deprecations

Symfony 5.4 returning deprecations about 
```
User Deprecated: Method "Twig\Extension\ExtensionInterface::getFunctions()" might add "array" as a native return type declaration in the future.
Do the same in implementation "Nelmio\ApiDocBundle\Render\Html\GetNelmioAsset" now to avoid errors or add an explicit @return annotation to suppress this message.
```

* fixed : native hint
2021-12-11 13:58:33 +01:00
Guilhem Niot
82bb3cb916
Fix usage of getCollectionValueTypes and getCollectionKeyTypes (#1910)
* Fix usage of getCollectionValueTypes and getCollectionKeyTypes

* fix cs
2021-11-30 13:06:32 +01:00
Vladislav
d59dbbd859
Issue 1848 operation id by route name (#1907)
* Fix #1885 update psr/log and psr/container

* Issue #1848 operation id by route name

Co-authored-by: Vlad Gaiduk <uahaiduk@gmail.com>
2021-11-22 20:18:16 +01:00
Christopher Davis
1e45fdf1d6 Fix a Named Parameter on PHP 8 2021-11-06 07:42:38 -05:00
Christopher Davis
10d6d57ca7 Remove Some Trailing Comma 2021-11-06 07:42:38 -05:00
Christopher Davis
477442588a Fix CS 2021-11-06 07:42:38 -05:00
Christopher Davis
76949ca537 Fix a Deprecated Method Call on Symfony 5.3 2021-11-06 07:42:33 -05:00
Christopher Davis
7357de9c16 Add a Configuration Option to Enable Validation Groups
If this was turned on by default, that seems like a _large_ BC break as
folks entire OpenAPI doc could change underneath them.

The config option defaults to false and users can enable it if they
desire.
2021-11-06 07:13:56 -05:00