Skip to content

Commit

Permalink
Merge branch release/v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Dec 12, 2023
1 parent c8f4d07 commit 327d6c7
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.0', '8.1']
php-version: ['8.1', '8.2', '8.3']
steps:
- uses: shivammathur/setup-php@v2
with:
Expand Down
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright © 2023 Ambroise Maupate

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=8.1",
"ext-json": "*",
"roadiz/nodetype-contracts": "~1.1.2",
"symfony/string": "5.4.*",
Expand All @@ -37,8 +37,8 @@
},
"extra": {
"branch-alias": {
"dev-main": "2.1.x-dev",
"dev-develop": "2.2.x-dev"
"dev-main": "2.2.x-dev",
"dev-develop": "2.3.x-dev"
}
}
}
6 changes: 3 additions & 3 deletions src/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ protected function getClassHeader(): string
];

if ($this->options['use_api_platform_filters'] === true) {
$useStatements[] = 'use ApiPlatform\Core\Annotation\ApiFilter;';
$useStatements[] = 'use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter as OrmFilter;';
$useStatements[] = 'use ApiPlatform\Core\Serializer\Filter\PropertyFilter;';
$useStatements[] = 'use ApiPlatform\Metadata\ApiFilter;';
$useStatements[] = 'use ApiPlatform\Doctrine\Orm\Filter as OrmFilter;';
$useStatements[] = 'use ApiPlatform\Serializer\Filter\PropertyFilter;';
}
/*
* BE CAREFUL, USE statements are required for field generators which
Expand Down
12 changes: 0 additions & 12 deletions src/Field/NonVirtualFieldGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,6 @@ protected function getFieldLength(): ?int
};
}

protected function getMaxDefaultValuesLength(): int
{
// get max length of exploded default values
$max = 0;
foreach (explode(',', $this->field->getDefaultValues()) as $value) {
$value = trim($value);
$max = max($max, \mb_strlen($value));
}

return $max > 0 ? $max : 250;
}

protected function isExcludingFieldFromJmsSerialization(): bool
{
return false;
Expand Down
6 changes: 3 additions & 3 deletions tests/mocks/GeneratedNodesSources/NSMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
use Symfony\Component\Serializer\Annotation as SymfonySerializer;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter as OrmFilter;
use ApiPlatform\Core\Serializer\Filter\PropertyFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Doctrine\Orm\Filter as OrmFilter;
use ApiPlatform\Serializer\Filter\PropertyFilter;

/**
* DO NOT EDIT
Expand Down
6 changes: 3 additions & 3 deletions tests/mocks/GeneratedNodesSourcesWithRepository/NSMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
use Symfony\Component\Serializer\Annotation as SymfonySerializer;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter as OrmFilter;
use ApiPlatform\Core\Serializer\Filter\PropertyFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Doctrine\Orm\Filter as OrmFilter;
use ApiPlatform\Serializer\Filter\PropertyFilter;

/**
* DO NOT EDIT
Expand Down

0 comments on commit 327d6c7

Please sign in to comment.