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

PHPStan level 8 compliance #324

Merged
merged 1 commit into from
Nov 11, 2024
Merged

PHPStan level 8 compliance #324

merged 1 commit into from
Nov 11, 2024

Conversation

JorickPepin
Copy link
Member

To fix:

------ ---------------------------------------------------------------------- 
  Line   .castor/docker.php                                                    
 ------ ---------------------------------------------------------------------- 
  362    Parameter #1 $data of class Castor\Context constructor expects        
         array{project_name: string, root_domain: string, extra_domains:       
         array<string>, project_directory: string, php_version: string,        
         docker_compose_files: array<string>, macos: bool, power_shell: bool,  
         ...}, non-empty-array<string, mixed> given.                           
 ------ ---------------------------------------------------------------------- 

This may not be the cleanest way to do it, WDYT?

Copy link
Member

@pyrech pyrech left a comment

Choose a reason for hiding this comment

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

Not sure if this is the right place for it, and we provide a PHPStan level 6 by default, but i won't vote against it 👍

@lyrixx
Copy link
Member

lyrixx commented Oct 4, 2024

This fix seems weird to me. Is there a better way to fix it?
IIRC, there one but can't remember 🙃

@JorickPepin
Copy link
Member Author

Hi @lyrixx, I pushed another fix that seems better.

I think we can set PHPStan level 8 by default as this boilerplate is mainly used to create new projects, WDYT?

@@ -28,7 +28,6 @@ parameters:
power_shell: bool,
user_id: int,
root_dir: string,
env: string,
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed in f495759

Copy link
Member

@pyrech pyrech left a comment

Choose a reason for hiding this comment

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

LGTM

.castor/docker.php Outdated Show resolved Hide resolved
Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

Thanks

@lyrixx lyrixx merged commit cf7ac22 into main Nov 11, 2024
4 checks passed
@lyrixx lyrixx deleted the phpstan-level8 branch November 11, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants