Skip to content

Commit

Permalink
Merge pull request #214 from phpcr/symfony-7
Browse files Browse the repository at this point in the history
WIP: test with symfony 7 and php 8.3
  • Loading branch information
dbu authored Nov 27, 2023
2 parents 0117929 + 3921d65 commit 84c51df
Show file tree
Hide file tree
Showing 19 changed files with 43 additions and 127 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- php-version: '7.3'
- php-version: '7.4'
- php-version: '8.0'
- php-version: '8.0'
dev-dependencies: true
- php-version: '8.1'
- php-version: '8.2'
- php-version: '8.3'
- php-version: '8.3'

steps:
- name: Checkout project
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changelog
=========

2.x
---

2.0.0 (unreleased)
------------------

* Support Symfony 7
* Test with PHP 8.3
* Adjusted commands to have the return type declarations.

1.x
---

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"require": {
"php": "^7.2 || ^8.0",
"phpcr/phpcr": "~2.1.0",
"symfony/console": "^2.3 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
"symfony/console": "^2.3 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"require-dev": {
"ramsey/uuid": "^3.5",
Expand Down
11 changes: 2 additions & 9 deletions src/PHPCR/Util/Console/Command/NodeDumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@
*/
class NodeDumpCommand extends BaseCommand
{
/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
*/
protected function configure()
protected function configure(): void
{
$this
->setName('phpcr:node:dump')
Expand Down Expand Up @@ -56,13 +51,11 @@ protected function configure()
}

/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
* @throws Exception
* @throws RepositoryException
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();
$dumperHelper = $this->getPhpcrConsoleDumperHelper();
Expand Down
11 changes: 2 additions & 9 deletions src/PHPCR/Util/Console/Command/NodeMoveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
*/
class NodeMoveCommand extends BaseCommand
{
/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
*/
protected function configure()
protected function configure(): void
{
$this
->setName('phpcr:node:move')
Expand All @@ -43,11 +38,9 @@ protected function configure()
}

/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();

Expand Down
11 changes: 2 additions & 9 deletions src/PHPCR/Util/Console/Command/NodeRemoveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@
*/
class NodeRemoveCommand extends BaseCommand
{
/**
* {@inheritdoc}
*
* @throws CliInvalidArgumentException
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -53,12 +48,10 @@ protected function configure()
}

/**
* {@inheritdoc}
*
* @throws CliInvalidArgumentException
* @throws InvalidArgumentException
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();

Expand Down
11 changes: 2 additions & 9 deletions src/PHPCR/Util/Console/Command/NodeTouchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@
*/
class NodeTouchCommand extends BaseNodeManipulationCommand
{
/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down Expand Up @@ -73,11 +68,9 @@ protected function configure()
}

/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$helper = $this->getPhpcrHelper();
$session = $this->getPhpcrSession();
Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/NodeTypeListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
*/
class NodeTypeListCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('phpcr:node-type:list')
Expand All @@ -31,10 +28,7 @@ protected function configure()
);
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();
$ntm = $session->getWorkspace()->getNodeTypeManager();
Expand Down
9 changes: 2 additions & 7 deletions src/PHPCR/Util/Console/Command/NodeTypeRegisterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
*/
class NodeTypeRegisterCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('phpcr:node-type:register')
Expand Down Expand Up @@ -62,11 +59,9 @@ protected function configure()
}

/**
* {@inheritdoc}
*
* @throws InvalidArgumentException
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$definitions = $input->getArgument('cnd-file');

Expand Down
11 changes: 2 additions & 9 deletions src/PHPCR/Util/Console/Command/NodesUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
*/
class NodesUpdateCommand extends BaseNodeManipulationCommand
{
/**
* {@inheritdoc}
*
* @throws CliInvalidArgumentException
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down Expand Up @@ -85,12 +80,10 @@ protected function configure()
}

/**
* {@inheritdoc}
*
* @throws CliInvalidArgumentException
* @throws InvalidArgumentException
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$query = $input->getOption('query');
$queryLanguage = strtoupper($input->getOption('query-language'));
Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/WorkspaceCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
*/
class WorkspaceCreateCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('phpcr:workspace:create')
Expand All @@ -42,10 +39,7 @@ protected function configure()
);
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();

Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/WorkspaceDeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
*/
class WorkspaceDeleteCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('phpcr:workspace:delete')
Expand All @@ -37,10 +34,7 @@ protected function configure()
);
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();

Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/WorkspaceExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
*/
class WorkspaceExportCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -42,10 +39,7 @@ protected function configure()
);
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();
$repo = $session->getRepository();
Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/WorkspaceImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ class WorkspaceImportCommand extends BaseCommand
'throw' => ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_THROW,
];

/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down Expand Up @@ -62,10 +59,7 @@ protected function configure()
);
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$filename = $input->getArgument('filename');
$parentPath = $input->getOption('parentpath');
Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/WorkspaceListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
*/
class WorkspaceListCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName('phpcr:workspace:list')
Expand All @@ -29,10 +26,7 @@ protected function configure()
);
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();

Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/WorkspacePurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
*/
class WorkspacePurgeCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -36,10 +33,7 @@ protected function configure()
);
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$session = $this->getPhpcrSession();
$force = $input->getOption('force');
Expand Down
10 changes: 2 additions & 8 deletions src/PHPCR/Util/Console/Command/WorkspaceQueryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
*/
class WorkspaceQueryCommand extends BaseCommand
{
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -34,10 +31,7 @@ protected function configure()
->setHelp('The <info>query</info> command executes a JCR query statement on the content repository');
}

/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$sql = $input->getArgument('query');
$language = $input->getOption('language');
Expand Down
Loading

0 comments on commit 84c51df

Please sign in to comment.