I recently launched 2 laravel package , how should i promote it
I recently created and launched 2 laravel package, 1 a laravel installer package and another one is laravel health package. but both having less than 30 stars in github and less installs.
i created the packages , uploaded to github and packagist and waiting for people to use it. but whats the best way to let the developers know about the packages ?
please share your suggestions
https://redd.it/1pytiuy
@r_php
I recently created and launched 2 laravel package, 1 a laravel installer package and another one is laravel health package. but both having less than 30 stars in github and less installs.
i created the packages , uploaded to github and packagist and waiting for people to use it. but whats the best way to let the developers know about the packages ?
please share your suggestions
https://redd.it/1pytiuy
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
i refactored 2,400 lines of 2015 php spaghetti and the client’s app went from 8s load times to 1.2s
I took on a client project last month. saas app built in 2015, never touched since. php 7.2, laravel 5.something, zero tests, one 800-line controller, and page load times that made users think their wifi died.
client's exact words: "we're scared to change anything because we don't know what breaks."
so i treated the refactor like defusing a bomb: slow, methodical, with safety checks at every step.
the nightmare i inherited
here's what i was dealing with:
* one `OrderController.php` with 847 lines handling checkout, invoices, emails, pdf generation, and webhook callbacks in the same file
* n+1 queries everywhere (one page was hitting the db 340+ times)
* no service classes, no jobs, everything crammed into controllers
* blade templates with raw sql and business logic mixed in
* zero automated tests
* comments like `// TODO: fix this later (2016)`
load times averaged 6–8 seconds for the dashboard. client was losing signups because the checkout page took 12 seconds to render.
step 1: break it into phases instead of yolo refactoring
first mistake most devs make: trying to refactor everything at once.
i dumped the entire checkout flow into traycer and asked it to reverse-engineer what the code actually does and break it into phases. while i was using cursor to scaffold and refactor, i also had coderabbit reviewing the changes in real time so it could flag risky edits and edge cases as the code was being rewritten.
traycer gave me:
* phase 1: extract payment logic into service class
* phase 2: move email/pdf generation into queued jobs
* phase 3: fix n+1 queries with eager loading
* phase 4: split 800-line controller into smaller ones
* phase 5: clean up blade templates (remove business logic)
each phase was small enough that if i broke something, i'd know exactly where.
step 2: the before/after safety trick
here's what saved me from breaking everything:
before touching code in a phase:
* ran a local review on the old code, asked it: "what does this code do, what edge cases does it handle, what breaks if X happens"
* saved the response as `phase1-before.txt`
after refactoring:
* ran the same review on the new code
* saved as `phase1-after.txt`
* compared them
if the behavior denoscriptions didn't match = i broke something.
if they matched = safe to move on.
caught 3 bugs this way that i would've missed otherwise:
* weird timezone handling for EU orders
* silent error swallow that was actually preventing duplicate charges
* race condition with concurrent webhook callbacks
step 3: cursor doing the actual heavy lifting
for each phase, i fed cursor the spec from traycer and let it scaffold the new structure.
phase 1 example:
* cursor created the `PaymentService` class
* moved all stripe/payment logic from controller into service
* updated controller to use the service
* fixed all the imports automatically
did this in composer mode so it could edit multiple files at once. saved me hours of copy-paste-fix-imports hell.
then i'd run the before/after check, fix anything that diverged, write a few quick tests, and move to next phase.
step 4: fixing the performance disasters
once behavior was safe, i did a performance-focused review pass on each phase:
prompt i used:
>"scan for n+1 queries, missing indexes, heavy loops, and unnecessary db calls. show me file:line and a one-liner fix."
fed that back into cursor and let it optimize.
biggest win: the order listing page went from 340 db queries to 8 with proper eager loading. that alone dropped load time from 8s to 2s.
the results after 6 days
before:
* 2,400 lines across 4 files
* 6–8s average dashboard load
* 12s checkout page render
* zero tests
* client losing conversions because of speed
after:
* 1,850 lines across 14 cleaner files
* 1.2s dashboard load (83% faster)
* 2.8s checkout render (77% faster)
* 40+ tests covering critical paths
* client's conversion rate up 34% week one (pricing page was loading so slow)
https://redd.it/1pyvsls
@r_php
I took on a client project last month. saas app built in 2015, never touched since. php 7.2, laravel 5.something, zero tests, one 800-line controller, and page load times that made users think their wifi died.
client's exact words: "we're scared to change anything because we don't know what breaks."
so i treated the refactor like defusing a bomb: slow, methodical, with safety checks at every step.
the nightmare i inherited
here's what i was dealing with:
* one `OrderController.php` with 847 lines handling checkout, invoices, emails, pdf generation, and webhook callbacks in the same file
* n+1 queries everywhere (one page was hitting the db 340+ times)
* no service classes, no jobs, everything crammed into controllers
* blade templates with raw sql and business logic mixed in
* zero automated tests
* comments like `// TODO: fix this later (2016)`
load times averaged 6–8 seconds for the dashboard. client was losing signups because the checkout page took 12 seconds to render.
step 1: break it into phases instead of yolo refactoring
first mistake most devs make: trying to refactor everything at once.
i dumped the entire checkout flow into traycer and asked it to reverse-engineer what the code actually does and break it into phases. while i was using cursor to scaffold and refactor, i also had coderabbit reviewing the changes in real time so it could flag risky edits and edge cases as the code was being rewritten.
traycer gave me:
* phase 1: extract payment logic into service class
* phase 2: move email/pdf generation into queued jobs
* phase 3: fix n+1 queries with eager loading
* phase 4: split 800-line controller into smaller ones
* phase 5: clean up blade templates (remove business logic)
each phase was small enough that if i broke something, i'd know exactly where.
step 2: the before/after safety trick
here's what saved me from breaking everything:
before touching code in a phase:
* ran a local review on the old code, asked it: "what does this code do, what edge cases does it handle, what breaks if X happens"
* saved the response as `phase1-before.txt`
after refactoring:
* ran the same review on the new code
* saved as `phase1-after.txt`
* compared them
if the behavior denoscriptions didn't match = i broke something.
if they matched = safe to move on.
caught 3 bugs this way that i would've missed otherwise:
* weird timezone handling for EU orders
* silent error swallow that was actually preventing duplicate charges
* race condition with concurrent webhook callbacks
step 3: cursor doing the actual heavy lifting
for each phase, i fed cursor the spec from traycer and let it scaffold the new structure.
phase 1 example:
* cursor created the `PaymentService` class
* moved all stripe/payment logic from controller into service
* updated controller to use the service
* fixed all the imports automatically
did this in composer mode so it could edit multiple files at once. saved me hours of copy-paste-fix-imports hell.
then i'd run the before/after check, fix anything that diverged, write a few quick tests, and move to next phase.
step 4: fixing the performance disasters
once behavior was safe, i did a performance-focused review pass on each phase:
prompt i used:
>"scan for n+1 queries, missing indexes, heavy loops, and unnecessary db calls. show me file:line and a one-liner fix."
fed that back into cursor and let it optimize.
biggest win: the order listing page went from 340 db queries to 8 with proper eager loading. that alone dropped load time from 8s to 2s.
the results after 6 days
before:
* 2,400 lines across 4 files
* 6–8s average dashboard load
* 12s checkout page render
* zero tests
* client losing conversions because of speed
after:
* 1,850 lines across 14 cleaner files
* 1.2s dashboard load (83% faster)
* 2.8s checkout render (77% faster)
* 40+ tests covering critical paths
* client's conversion rate up 34% week one (pricing page was loading so slow)
https://redd.it/1pyvsls
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Evaluator – Laravel Powered MCQ Assessment Platform
I originally built this project several years ago for a company I worked with at the time, and later decided to refine it and make it open source.
Evaluator is specifically designed for internal assessments within companies and institutes. Imagine a management team needing to conduct a secure quiz to evaluate candidates’ knowledge. This is exactly where Evaluator fits. It includes unique security features, such as allowing candidates to participate without logging in and automatically submitting the assessment if they navigate away.
Use Cases:
Educational Institutions (universities, schools, etc.) – conduct quizzes, tests, weekly assessments, or practice exams.
Corporate Training – assess employee knowledge after training sessions or workshops.
Pre-Promotion Assessments – evaluate employees’ skills and competencies before promotions or role changes.
Recruitment \- evaluate candidates through structured MCQ-based questionnaires and skill assessments.
Event Management – run fun and engaging quizzes for events, competitions, or team-building activities.
Online Coaching & E-Learning Platforms – deliver topic-wise quizzes, mock tests, and learner progress tracking.
Certification Programs – create standardized assessments for validating skill levels or course completion.
Research & Surveys – collect data through interactive question sets for academic or market research.
Customer Engagement – use quizzes for brand engagement, product awareness, or promotional campaigns.
Compliance & Policy Training – ensure staff understand policies, safety protocols, or legal requirements.
Student Clubs & Communities – organize trivia events, knowledge battles, or club-specific assessments.
Whether you need a secure platform for formal evaluations or a flexible tool for interactive assessments, Evaluator has you covered.[](https://lakm.gitbook.io/evaluator)
Key Features
🚀 Team Support – Organize users into teams to manage different business sections effortlessly.
📊 Dashboard Overview – Get a quick summary of all essential insights in one place.
🛠️ Advanced Admin Panel – Powerful tools to manage users, quizzes, and results with ease.
🏷️ Categorizable Quizzes & Questions – Group and manage quizzes and questions with smart categorization.
🎯 Difficulty Levels – Assign Easy, Medium, or Hard levels to each question for balanced tests.
🔐 Secure Access – Only admins log in; users receive unique secure codes to access quizzes.
🕒 Smart Security Tokens
One-time use
Auto-expiring
Revocable by admin
⏰ Timed Quizzes – Auto-submit after timeout; refreshing or closing invalidates the attempt.
🖼️ Image Attachments – Add and manage images for both questions and answers via an advanced image manager.
🖨️ Printable Quizzes – Generate A4-size quiz papers for offline use.
⚡ Real-Time Evaluation – Instant feedback on scores, accuracy, and performance metrics.
📋 Advanced Evaluation – Admins can review detailed answers; printable summaries available.
🔎 Elegant Data Tables – Filter, sort, and manage data efficiently.
✅ Smart Form Validations – Prevent errors with built-in validations for all input fields.
📱 Responsive Design – Fully optimized for desktop, tablet, and mobile devices.
🎨 Modern UI/UX – Clean, intuitive, and designed for smooth user experience.
🌜 Dark Mode Support
⚙️ Performance Optimized – Built for speed and scalability.
💡 Syntax Highlighting – Enhanced readability for code-based questions.
🌟 And Many More! – Constantly evolving with new features and improvements.
REPO: https://github.com/Lakshan-Madushanka/evaluator-full-stack
https://redd.it/1pzhw38
@r_php
I originally built this project several years ago for a company I worked with at the time, and later decided to refine it and make it open source.
Evaluator is specifically designed for internal assessments within companies and institutes. Imagine a management team needing to conduct a secure quiz to evaluate candidates’ knowledge. This is exactly where Evaluator fits. It includes unique security features, such as allowing candidates to participate without logging in and automatically submitting the assessment if they navigate away.
Use Cases:
Educational Institutions (universities, schools, etc.) – conduct quizzes, tests, weekly assessments, or practice exams.
Corporate Training – assess employee knowledge after training sessions or workshops.
Pre-Promotion Assessments – evaluate employees’ skills and competencies before promotions or role changes.
Recruitment \- evaluate candidates through structured MCQ-based questionnaires and skill assessments.
Event Management – run fun and engaging quizzes for events, competitions, or team-building activities.
Online Coaching & E-Learning Platforms – deliver topic-wise quizzes, mock tests, and learner progress tracking.
Certification Programs – create standardized assessments for validating skill levels or course completion.
Research & Surveys – collect data through interactive question sets for academic or market research.
Customer Engagement – use quizzes for brand engagement, product awareness, or promotional campaigns.
Compliance & Policy Training – ensure staff understand policies, safety protocols, or legal requirements.
Student Clubs & Communities – organize trivia events, knowledge battles, or club-specific assessments.
Whether you need a secure platform for formal evaluations or a flexible tool for interactive assessments, Evaluator has you covered.[](https://lakm.gitbook.io/evaluator)
Key Features
🚀 Team Support – Organize users into teams to manage different business sections effortlessly.
📊 Dashboard Overview – Get a quick summary of all essential insights in one place.
🛠️ Advanced Admin Panel – Powerful tools to manage users, quizzes, and results with ease.
🏷️ Categorizable Quizzes & Questions – Group and manage quizzes and questions with smart categorization.
🎯 Difficulty Levels – Assign Easy, Medium, or Hard levels to each question for balanced tests.
🔐 Secure Access – Only admins log in; users receive unique secure codes to access quizzes.
🕒 Smart Security Tokens
One-time use
Auto-expiring
Revocable by admin
⏰ Timed Quizzes – Auto-submit after timeout; refreshing or closing invalidates the attempt.
🖼️ Image Attachments – Add and manage images for both questions and answers via an advanced image manager.
🖨️ Printable Quizzes – Generate A4-size quiz papers for offline use.
⚡ Real-Time Evaluation – Instant feedback on scores, accuracy, and performance metrics.
📋 Advanced Evaluation – Admins can review detailed answers; printable summaries available.
🔎 Elegant Data Tables – Filter, sort, and manage data efficiently.
✅ Smart Form Validations – Prevent errors with built-in validations for all input fields.
📱 Responsive Design – Fully optimized for desktop, tablet, and mobile devices.
🎨 Modern UI/UX – Clean, intuitive, and designed for smooth user experience.
🌜 Dark Mode Support
⚙️ Performance Optimized – Built for speed and scalability.
💡 Syntax Highlighting – Enhanced readability for code-based questions.
🌟 And Many More! – Constantly evolving with new features and improvements.
REPO: https://github.com/Lakshan-Madushanka/evaluator-full-stack
https://redd.it/1pzhw38
@r_php
lakm.gitbook.io
Welcome | Evaluator
Job Middleware Patterns: Database transactions, distributed locking, and domain-specific logic
https://queuewatch.io/blog/job-middleware-patterns-database-transactions-distributed-locking-and-domain-specific-logic
https://redd.it/1pzis0l
@r_php
https://queuewatch.io/blog/job-middleware-patterns-database-transactions-distributed-locking-and-domain-specific-logic
https://redd.it/1pzis0l
@r_php
Queuewatch
Job Middleware Patterns: Database transactions, distributed locking, and domain-specific logic - Queuewatch
Laravel's job middleware system is one of the framework's most powerful yet underutilized features. While most developers know about RateLimited and WithoutOverlapping, the middleware pipeline enables sophisticated patterns that transform how jobs interact…
Votes needed for a VS Code feature request: Node filter for objects variables on debug hover
I requested this feature from the VS Code repo. Now, it needs 20 upvotes within 30 days to start development. If you find this feature helpful, please open the request and upvote. Thanks
https://github.com/microsoft/vscode/issues/279795
https://redd.it/1pznecw
@r_php
I requested this feature from the VS Code repo. Now, it needs 20 upvotes within 30 days to start development. If you find this feature helpful, please open the request and upvote. Thanks
https://github.com/microsoft/vscode/issues/279795
https://redd.it/1pznecw
@r_php
GitHub
Debug Hover: Node filter for objects · Issue #279795 · microsoft/vscode
While debugging, hovering over an object variable shows too many nodes, which is annoying. Can we add a filter box, like in the image, so we only see the selected node always for object variables, ...
PHP Symfony Microservice with gRPC: A Practical Guide
Post: https://albertcolom.com/posts/php-symfony-microservice-with-grpc-a-practical-guide/
GirHub: https://github.com/albertcolom/symfony-grpc
https://redd.it/1pzr6rh
@r_php
Post: https://albertcolom.com/posts/php-symfony-microservice-with-grpc-a-practical-guide/
GirHub: https://github.com/albertcolom/symfony-grpc
https://redd.it/1pzr6rh
@r_php
️Albert Colom
PHP Symfony Microservice with gRPC: A Practical Guide
Learn how to build a PHP Symfony microservice with gRPC in this practical guide. Explore step-by-step instructions to set up, implement, and optimize gRPC for fast, scalable microservices in PHP.
My "Ship Factory" for 12 SaaS products in 12 months (Laravel Octane + Traefik on VPS). Overkill?
I'm starting a challenge to ship 12 products in 2026. To avoid burnout, I need zero-friction deployments.
I skipped Vercel/Forge and built this on a $10 OVH VPS:
Backend: Laravel 12 + Octane (Swoole)
Frontend: Nuxt 4 SSR
Routing: Docker Compose + Traefik (auto SSL).
CI/CD: GitHub Actions.
A push to
Am I setting myself up for pain managing 12 Docker stacks manually over 12 months, or is this the optimal path for cost/performance control vs a PaaS?
https://preview.redd.it/ljl1jfpa1fag1.png?width=1024&format=png&auto=webp&s=fcec5c7398ff25c637ec7557c3a33316bdfd6a51
https://redd.it/1pzvfu8
@r_php
I'm starting a challenge to ship 12 products in 2026. To avoid burnout, I need zero-friction deployments.
I skipped Vercel/Forge and built this on a $10 OVH VPS:
Backend: Laravel 12 + Octane (Swoole)
Frontend: Nuxt 4 SSR
Routing: Docker Compose + Traefik (auto SSL).
CI/CD: GitHub Actions.
A push to
main builds the container, pushes to GHCR, and updates the stack on the VPS in < 2 mins.Am I setting myself up for pain managing 12 Docker stacks manually over 12 months, or is this the optimal path for cost/performance control vs a PaaS?
https://preview.redd.it/ljl1jfpa1fag1.png?width=1024&format=png&auto=webp&s=fcec5c7398ff25c637ec7557c3a33316bdfd6a51
https://redd.it/1pzvfu8
@r_php
Which translation style do you use?
In Laravel we know multiple ways to handle translations. Are you a .json or a .php kinda person. Do you have multi layer directories or keep it simple?
Personally I have always done the php file with multiple directories per livewire component or domain of the application.
https://redd.it/1q09zk6
@r_php
In Laravel we know multiple ways to handle translations. Are you a .json or a .php kinda person. Do you have multi layer directories or keep it simple?
Personally I have always done the php file with multiple directories per livewire component or domain of the application.
https://redd.it/1q09zk6
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
20 Years of Symfony: A Gift for the Community✨
https://symfony.com/blog/20-years-of-symfony-a-gift-for-the-community?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1q0aah8
@r_php
https://symfony.com/blog/20-years-of-symfony-a-gift-for-the-community?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1q0aah8
@r_php
Symfony
20 Years of Symfony: A Gift for the Community✨ (Symfony Blog)
To celebrate the holidays and 20 years of Symfony, we’re offering a special gift to the community 🎁 Watch Fabien Potencier’s keynote “20 Years of Symfony, What’s Next?” — free and avail…
Yii3 is released
It happened! Yii3 is officially released after years of intensive development and polishing.
• Yii3 landing page
• Official announcement
• Documentation
• Application templates: Web, API, Console
• Demo applications: Blog (Layered DDD), Diary (Vertical slices, Active Record)
We're pretty sure the Yii3 codebase will serve us well in at least the next 10 years or even more.
Merry Christmas and Happy New Year! Enjoy! 🎉
https://redd.it/1q0ceia
@r_php
It happened! Yii3 is officially released after years of intensive development and polishing.
• Yii3 landing page
• Official announcement
• Documentation
• Application templates: Web, API, Console
• Demo applications: Blog (Layered DDD), Diary (Vertical slices, Active Record)
We're pretty sure the Yii3 codebase will serve us well in at least the next 10 years or even more.
Merry Christmas and Happy New Year! Enjoy! 🎉
https://redd.it/1q0ceia
@r_php
Yiiframework
Yii3 Framework
PHP framework for rapid development of modern applications.
My architecture decision while building an Audit Bundle for Symfony
While building an audit trail bundle for Symfony, I had to make a key architectural decision:
how to capture accurate entity changes without slowing down the main request or coupling the audit logic too tightly with Doctrine internals.
I ended up designing a split-phase audit architecture.
You can find the complete article here
If you’re interested, you can also check out the code repository here
suggestions are very welcome.
https://redd.it/1q0f0ft
@r_php
While building an audit trail bundle for Symfony, I had to make a key architectural decision:
how to capture accurate entity changes without slowing down the main request or coupling the audit logic too tightly with Doctrine internals.
I ended up designing a split-phase audit architecture.
You can find the complete article here
If you’re interested, you can also check out the code repository here
suggestions are very welcome.
https://redd.it/1q0f0ft
@r_php
Medium
Designing a Split-Phase Audit Architecture for Symfony
Building a Production-Ready Audit Trail Without Compromising Performance
Refactoring column names
I recently had to refactor a single column in a very large app (thousands of routes, 270 models) and wondered if there was a better way to track usage of a single column
My specific scenario was a nightmare because what I wanted to do was refactor a column called "type" to be called "type_id" so that
Of course it could have been possible to refactor in a different way, keep the "type" column and have the object available under another name, but other tables generally used the syntax of
Obviously doing a search for "type" returned thousands of results throughout the app.
Most of the time these were either prefixed by -> or wrapped in single quotes e.g.
Nonetheless I could not figure a means of doing this refactor other than searching the entire codebase for "type" and going through every single result line by line, what I actually did was use
But is there a better way?
I started dreaming of one day having a project where all columns where defined in constants so I could easily find all usages of
It would have been nice if my Model would have had a
It may be possible to use an LLM but i've no idea how people give an entire massive monolith to an LLM and I wouldn't totally trust it to not make any mistakes checking thousands of occurrences so I would still have to go through every single one, one by one.
The only real conclusion I could draw was that (1) my grep to text file approach wasn't THAT bad and (2) the most important thing would be having full test coverage. If I had that in theory I could run the migration to rename the column and then have the test populate a list of every place that was affected. Although I don't think i'd ever be confident enough to trust and not do the grep method.
But yes, I assume many, many people have faced this problem and wondered how people approach it and if there's some amazing tool or technique i'm missing?
If anyone is not sure what I mean about the grep you can run these commands in a terminal:
And get results like this into a text file
>./app/Console/Kernel.php:68: $schedule->command('videos:get-channel-stats --type=daily')
>./app/Console/Kernel.php:73: $schedule->command('videos:get-channel-stats --type=weekly')
>./app/Console/Kernel.php:78: $schedule->command('videos:get-channel-stats --type=monthly')
>./app/Console/Kernel.php:83: $schedule->command('videos:get-video-stats --type=daily')
>./app/Console/Kernel.php:88: $schedule->command('videos:get-video-stats --type=weekly')
>./app/Console/Kernel.php:93: $schedule->command('videos:get-video-stats --type=monthly')
Of course you can use find within your IDE, but the benefit of this is having a txt file where you can tick them off
I recently had to refactor a single column in a very large app (thousands of routes, 270 models) and wondered if there was a better way to track usage of a single column
My specific scenario was a nightmare because what I wanted to do was refactor a column called "type" to be called "type_id" so that
$model->type could return an object, where as previously it just returned a string, while the original string ID could still be accessible via ->type_id.Of course it could have been possible to refactor in a different way, keep the "type" column and have the object available under another name, but other tables generally used the syntax of
->object and ->object_id. Either way lets ignore that and focus on the refactor.Obviously doing a search for "type" returned thousands of results throughout the app.
Most of the time these were either prefixed by -> or wrapped in single quotes e.g.
$model->type or $array['type']. Sometimes it might be a property in a class e.g. CreateMyModel() accepting a $type argument. Other times it was not explicit that it was being used e.g. array_keys($model->getCasts) but I think most of these instances were caught by renaming in the one place it was explicitly defined (e.g. the casts array).Nonetheless I could not figure a means of doing this refactor other than searching the entire codebase for "type" and going through every single result line by line, what I actually did was use
grep to create a txt file and then go through line by line marking each one with * at the start of the line in the text file when it had been checked. Some of these I could tell just by eyeballing the response from grep itself whether it was related so this was fairly quick to just look through the txt file.But is there a better way?
I started dreaming of one day having a project where all columns where defined in constants so I could easily find all usages of
Model::column_type although I can imagine this would make the code feel very bloated and i've never seen anyone actually attempt this, probably for good reason.It would have been nice if my Model would have had a
$type property in the class itself rather than all the Laravel magic. But then again I would still have had to go through my grep approach to find all the ways in which it was used.It may be possible to use an LLM but i've no idea how people give an entire massive monolith to an LLM and I wouldn't totally trust it to not make any mistakes checking thousands of occurrences so I would still have to go through every single one, one by one.
The only real conclusion I could draw was that (1) my grep to text file approach wasn't THAT bad and (2) the most important thing would be having full test coverage. If I had that in theory I could run the migration to rename the column and then have the test populate a list of every place that was affected. Although I don't think i'd ever be confident enough to trust and not do the grep method.
But yes, I assume many, many people have faced this problem and wondered how people approach it and if there's some amazing tool or technique i'm missing?
If anyone is not sure what I mean about the grep you can run these commands in a terminal:
grep -irn "type" ./app ./resources/views ./routes ./database > ./type_usages.logAnd get results like this into a text file
>./app/Console/Kernel.php:68: $schedule->command('videos:get-channel-stats --type=daily')
>./app/Console/Kernel.php:73: $schedule->command('videos:get-channel-stats --type=weekly')
>./app/Console/Kernel.php:78: $schedule->command('videos:get-channel-stats --type=monthly')
>./app/Console/Kernel.php:83: $schedule->command('videos:get-video-stats --type=daily')
>./app/Console/Kernel.php:88: $schedule->command('videos:get-video-stats --type=weekly')
>./app/Console/Kernel.php:93: $schedule->command('videos:get-video-stats --type=monthly')
Of course you can use find within your IDE, but the benefit of this is having a txt file where you can tick them off
one by one.
You could also put it into a CSV for use with Excel or any other tool like so:
https://redd.it/1q0hzag
@r_php
You could also put it into a CSV for use with Excel or any other tool like so:
echo "File Path,Line Number,Snippet" > type_usages.csv && grep -rin "type" ./app ./resources/views ./routes ./database | sed 's/"/""/g' | sed -E 's/^([^:]+):([^:]+):(.*)$/"\1",\2,"\3"/' >> type_usages.csvhttps://redd.it/1q0hzag
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Anyone any experience with Mago - an alternative for PHP-CS-Fixer, Psalm, PHPStan, and PHP_CodeSniffer?
I just came across this project and it seems very interesting. My current setup includes:
* PHP-CS-Fixer
* PHPStan
* Rector
I'm wondering if Mago might be a tool worth looking into. Anyone has any experience with it? I'd appreciate any feedback
https://redd.it/1q0yrto
@r_php
I just came across this project and it seems very interesting. My current setup includes:
* PHP-CS-Fixer
* PHPStan
* Rector
I'm wondering if Mago might be a tool worth looking into. Anyone has any experience with it? I'd appreciate any feedback
https://redd.it/1q0yrto
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Lychee 7 is released! FrankenPHP, Webshop & background processing
https://lycheeorg.dev/2025-12-31-version-7/
https://redd.it/1q1281q
@r_php
https://lycheeorg.dev/2025-12-31-version-7/
https://redd.it/1q1281q
@r_php
Lychee
Version 7 released!
Another year, another major release for Lychee! Version 7 is here with exciting new features and improvements.