Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to PHP 8.x, removed support for PHP 7.x #36

Merged
merged 2 commits into from Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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