Skip to content

Commit

Permalink
Merge pull request #36 from Ocramius/feature/drop-php-7
Browse files Browse the repository at this point in the history
Upgraded to PHP 8.x, removed support for PHP 7.x
  • Loading branch information
Ocramius committed Jan 17, 2021
2 parents 3c20712 + 7668836 commit 02aab6a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/phpunit.yml
Expand Up @@ -17,7 +17,6 @@ jobs:
- "highest"
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Expand Up @@ -55,3 +55,13 @@ jobs:
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
7 changes: 1 addition & 6 deletions composer.json
Expand Up @@ -19,7 +19,7 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.0",
"nikic/php-parser": "^4.10.4"
},
"require-dev": {
Expand All @@ -41,11 +41,6 @@
"CodeGenerationUtilsTestAsset\\": "tests/CodeGenerationUtilsTestAsset"
}
},
"config": {
"platform": {
"php": "7.4.7"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
Expand Down
21 changes: 9 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/CodeGenerationUtils/Visitor/ClassExtensionVisitor.php
Expand Up @@ -77,11 +77,9 @@ public function enterNode(Node $node): ?Namespace_
*
* @param Node $node
*
* @return Class_|null
*
* @todo can be abstracted away into a visitor that allows to modify the node via a callback
*/
public function leaveNode(Node $node)
public function leaveNode(Node $node): ?Class_
{
if ($node instanceof Namespace_) {
$this->currentNamespace = null;
Expand Down
5 changes: 1 addition & 4 deletions src/CodeGenerationUtils/Visitor/ClassRenamerVisitor.php
Expand Up @@ -79,13 +79,10 @@ public function enterNode(Node $node): ?Namespace_
/**
* Replaces (if matching) the given node to comply with the new given name
*
* @return Class_[]|Class_|Namespace_|null
*
* @psalm-return array{Class_}|Class_|Namespace_|null
*
* @todo can be abstracted away into a visitor that allows to modify the matched node via a callback
*/
public function leaveNode(Node $node)
public function leaveNode(Node $node): array | Class_ | Namespace_ | null
{
if ($node instanceof Namespace_) {
$namespace = $this->currentNamespace;
Expand Down
2 changes: 1 addition & 1 deletion src/CodeGenerationUtils/Visitor/MethodDisablerVisitor.php
Expand Up @@ -59,7 +59,7 @@ public function __construct(callable $filter)
*
* @psalm-return NodeTraverser::REMOVE_NODE|ClassMethod|null
*/
public function leaveNode(Node $node)
public function leaveNode(Node $node): int | ClassMethod | null
{
$filter = $this->filter;

Expand Down

0 comments on commit 02aab6a

Please sign in to comment.