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

feat: stubs declaring strict types #19

Merged

Conversation

juantejer4
Copy link

@juantejer4 juantejer4 commented Jan 3, 2024

⚡ Update Laravel boilerplate's stubs to declare strict types - task

💻 What type of change is this?

  • 💎 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Styling
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build / CI

⭐ Description

All stubs, including those for controllers, requests, and other artisan-generated files, have been updated to include declare(strict_types=1) at the top. This change will apply to all new code generated using artisan commands, promoting consistency and reliability in type usage throughout the application.

📸 Evidence

Now you can run for example sail artisan make:controller TestController
This process will confirm whether the modified stubs are being used for generating new files with the strict types declaration.
image

✅ Checklist

  • This PR can be merged (it is not a draft, work in progress, or blocked on another PR)
  • I have tested this change locally in multiple screen sizes
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@juantejer4 juantejer4 added the enhancement New feature or request label Jan 3, 2024
Copy link

@gianfranco-rocco gianfranco-rocco left a comment

Choose a reason for hiding this comment

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

Did you run some commands to validate they're generated with the strict types declaration?

cspell.json Outdated Show resolved Hide resolved
stubs/cast.inbound.stub Outdated Show resolved Hide resolved
stubs/cast.stub Outdated Show resolved Hide resolved
stubs/console.stub Outdated Show resolved Hide resolved
stubs/controller.api.stub Outdated Show resolved Hide resolved
stubs/scope.stub Outdated Show resolved Hide resolved
stubs/seeder.stub Outdated Show resolved Hide resolved
stubs/test.stub Outdated Show resolved Hide resolved
stubs/test.unit.stub Outdated Show resolved Hide resolved
stubs/view-component.stub Outdated Show resolved Hide resolved
@juantejer4
Copy link
Author

Did you run some commands to validate they're generated with the strict types declaration?

Yep, for instance running sail artisan make:controller TestController:
image

@juantejer4 juantejer4 merged commit a6bee7b into 10.x Jan 3, 2024
2 checks passed
@juantejer4 juantejer4 deleted the feature/CU-86dr22xuk/update-stubs-to-declare-strict-types branch January 3, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants