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

Make code more modern and implement php 7.4 type declarations #44

Closed
GeeH opened this issue Jun 12, 2020 · 9 comments · Fixed by #179 or #191
Closed

Make code more modern and implement php 7.4 type declarations #44

GeeH opened this issue Jun 12, 2020 · 9 comments · Fixed by #179 or #191
Assignees
Milestone

Comments

@GeeH
Copy link
Contributor

GeeH commented Jun 12, 2020

[x] add declare(strict_types=1) to all src and test files
[x] add parameter type declarations where appropriate
[x] add return type declarations where appropriate
[ ] add property types
[ ] update code style to PSR-12
[ ] Update composer dependencies including PHPUnit to modern versions
[ ] rejoice in a job well done

@GeeH GeeH self-assigned this Jun 12, 2020
@GeeH GeeH added this to the 3.5.0 milestone Jun 12, 2020
@GeeH GeeH changed the title Add PHP 7.3 type declarations Make code more modern and implement php 7.3 type declarations Jun 12, 2020
@GeeH GeeH modified the milestones: 3.5.0, 4.0.0 Jun 12, 2020
Ocramius added a commit that referenced this issue Jun 15, 2020
Ocramius added a commit that referenced this issue Jun 18, 2020
Updated mimumum PHP version to 7.4 and tried to add 8.0 to CI
@GeeH GeeH changed the title Make code more modern and implement php 7.3 type declarations Make code more modern and implement php 7.4 type declarations Jun 18, 2020
@ppaulis
Copy link

ppaulis commented Jan 7, 2021

@GeeH need some help on this?
I took a quick look at the dependencies. Not everything seems to be PHP8-ready yet, but I could help with the PSR-12 and the property types in the meantime.

@nusphere
Copy link

i also could help to improve the PSR-12 Coding Style and Type-Hint.

@nusphere
Copy link

@GeeH @ppaulis
is there currently someone who is actively working on it?

is it possible that I can divide myself into it? Because doing something twice is more or less pointless.
But since the issue has not been further developed since June 18th ... what is the current status?
or does it make sense to simply fork the current 4.0.0 branch and off you go?

@ppaulis
Copy link

ppaulis commented Mar 29, 2021

@nusphere I'm waiting for some maintainer input here to avoid doing the work at the same time than someone else.

@nusphere
Copy link

nusphere commented Apr 3, 2021

@ppaulis

Thank you for your feedback. in the meantime i have tried other components, as there is basically a lot to do.

Doing double the job makes absolutely no sense.

I am happy to help with this task, but I am now trying to create the basis for such a refactoring by helping to provide the GitHub Actions in the components.

@GeeH
Copy link
Contributor Author

GeeH commented Jun 7, 2021

Hi, huge apologies, real life took over. I'm happy to get back involved here but would you be able to roundup what you need from me please @nusphere ?

@boesing
Copy link
Member

boesing commented Jun 7, 2021

@GeeH In the meantime, we dropped v4.0.0 as having a new major version in the service manager would lead to a huge amount of work in almost every other component which works with the servicemanager directly (e.g. due to the usage of AbstractPluginManager).

Another thing is a proper migration path for the psr/container BC break.

Thus said, I don't think it makes sense to approach type-safety or PHP 7.4 type declarations without having a proper strategy on how we want to proceed with this component.

@fabiang
Copy link
Contributor

fabiang commented Aug 9, 2022

Just a side note for the one who will implement this, the return-type of Laminas\ServiceManager\Factory\FactoryInterface::__invoke() is currently declared as @return object, but even in real-world application __invoke() could return everything (even scalars).
So mixed is the correct return-type here. One example is Laminas\Mvc\Service\ConfigFactory::__invoke() which returns iterable.

@boesing boesing linked a pull request Mar 5, 2023 that will close this issue
5 tasks
@boesing boesing linked a pull request May 10, 2023 that will close this issue
@boesing
Copy link
Member

boesing commented May 10, 2023

Closed with #191

@boesing boesing closed this as completed May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants