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

drop PHP 7.x support #1122

Merged
merged 17 commits into from
May 18, 2022
Merged

drop PHP 7.x support #1122

merged 17 commits into from
May 18, 2022

Conversation

jrushlow
Copy link
Collaborator

@jrushlow jrushlow commented May 17, 2022

  • removes legacy typed property conditionals
  • removes legacy attribute conditions
  • reduces test complexity
  • implements constructor property promotion where possible in generated templates and internal classes
  • always use typed properties internally
  • most of the doctrine related PHP 7.x code will be removed in a separate PR.
  • does not fully remove PhpCompatUtil::class - that will be handled under a separate PR.

@jrushlow jrushlow added Feature New Feature Status: Needs Work Additional work is needed labels May 17, 2022
Comment on lines 146 to 150
public function isDoctrineSupportingAttributes(): bool
{
return $this->isDoctrineInstalled() && $this->attributeMappingSupport && $this->phpCompatUtil->canUseAttributes();
return $this->isDoctrineInstalled() && $this->attributeMappingSupport;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will handle bringing doctrine related makers up to PHP8 standards in a separate PR to avoid too much bloat in this one.

Comment on lines 872 to -883
/** @legacy Drop when Annotations are no longer supported */
private function doesEntityUseAttributeMapping(string $className): bool
{
if (!$this->phpCompatUtil->canUseAttributes()) {
return false;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handled under a separate PR dedicated to doctrine.

@jrushlow jrushlow changed the title WIP - drop PHP 7.x support drop PHP 7.x support May 18, 2022
@jrushlow jrushlow added Status: Needs Review Needs to be reviewed and removed Status: Needs Work Additional work is needed labels May 18, 2022
Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 just need to get the test to pass

appveyor.yml Outdated
@@ -27,7 +27,7 @@ environment:
TEST_DATABASE_DSN: mysql://root:Password12!@127.0.0.1:3306/test_maker
matrix:
- dependencies: highest
php_ver_target: 7.2.5
php_ver_target: 8.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests failing, looks like we may need to bump this to 8.0.SOMETHING that actually works, which is fine.

@jrushlow jrushlow added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels May 18, 2022
@jrushlow jrushlow merged commit cabeea3 into symfony:main May 18, 2022
@jrushlow jrushlow deleted the feature/8.0 branch May 18, 2022 18:23
@jrushlow jrushlow mentioned this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants