Skip to content

Commit

Permalink
Allow Symfony 6
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Oct 10, 2023
1 parent cb30430 commit 1d2a2ee
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~

jobs:
Expand Down
23 changes: 10 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"sylius-labs/doctrine-migrations-extra-bundle": "^0.1.3",
"sylius-labs/polyfill-symfony-framework-bundle": "^1.0",
"sylius/sylius": "~1.11.0 || ~1.12.0",
"symfony/form": "^5.4",
"symfony/framework-bundle": "^5.4",
"symfony/validator": "^5.4"
"symfony/form": "^5.4 || ^6.0",
"symfony/framework-bundle": "^5.4 || ^6.0",
"symfony/validator": "^5.4 || ^6.0"
},
"require-dev": {
"doctrine/data-fixtures": "^1.5",
Expand All @@ -42,14 +42,14 @@
"phpspec/phpspec": "^7.0",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"psalm/plugin-symfony": "^3.1",
"symfony/browser-kit": "^5.4",
"symfony/debug-bundle": "^5.4",
"symfony/dependency-injection": "^5.4",
"symfony/dotenv": "^5.4",
"psalm/plugin-symfony": "5.0",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dependency-injection": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/monolog-bundle": "^3.7",
"symfony/web-profiler-bundle": "^5.4",
"vimeo/psalm": "^4.6.4"
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
"vimeo/psalm": "^5.15"
},
"config": {
"sort-packages": true,
Expand All @@ -61,9 +61,6 @@
"extra": {
"branch-alias": {
"dev-main": "1.13-dev"
},
"symfony": {
"require": "^5.4"
}
},
"autoload": {
Expand Down
5 changes: 3 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ final class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('sylius_admin_api');

/** @var ArrayNodeDefinition $rootNode */
$rootNode = $treeBuilder->getRootNode();

$rootNode
->children()
->scalarNode('driver')->defaultValue(SyliusResourceBundle::DRIVER_DOCTRINE_ORM)->end()
->end()
->scalarNode('driver')->defaultValue(SyliusResourceBundle::DRIVER_DOCTRINE_ORM)
;

$this->addResourcesSection($rootNode);
Expand All @@ -51,6 +51,7 @@ public function getConfigTreeBuilder(): TreeBuilder

private function addResourcesSection(ArrayNodeDefinition $node): void
{
/** @psalm-suppress PossiblyUndefinedMethod */
$node
->children()
->arrayNode('resources')
Expand Down
1 change: 1 addition & 0 deletions src/Fixture/ApiAccessTokenFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function getName(): string

protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void
{
/** @psalm-suppress UndefinedInterfaceMethod,PossiblyUndefinedMethod */
$resourceNode
->children()
->scalarNode('client')->cannotBeEmpty()->end()
Expand Down
1 change: 1 addition & 0 deletions src/Fixture/ApiClientFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function getName(): string

protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void
{
/** @psalm-suppress UndefinedInterfaceMethod,PossiblyUndefinedMethod */
$resourceNode
->children()
->scalarNode('random_id')->cannotBeEmpty()->end()
Expand Down

0 comments on commit 1d2a2ee

Please sign in to comment.