Skip to content

Commit 4385b05

Browse files
committed
Fork package and update dependencies for Laravel 12 and PHP 8.4 support
1 parent 3c8c8bd commit 4385b05

File tree

4 files changed

+72
-25
lines changed

4 files changed

+72
-25
lines changed

.windsurfrules

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Laravel Localized Routes - Claude Guide
2+
3+
## Commands
4+
- Run all tests: `composer test`
5+
- Run single test: `./vendor/bin/phpunit --filter=TestName`
6+
- Run test suite: `./vendor/bin/phpunit --testsuite=Unit` or `--testsuite=Feature`
7+
8+
## Code Style
9+
- PSR-4 autoloading standard with `CodeZero\LocalizedRoutes\` namespace
10+
- Method visibility: public methods first, then protected, then private
11+
- DocBlocks for all methods with `@return` types
12+
- Type hints for method parameters and return types where possible
13+
- Protected properties with descriptive names
14+
- Explicit imports (no group imports)
15+
- Laravel naming conventions for classes and methods
16+
- Error handling through exceptions with descriptive messages
17+
18+
## Development
19+
- PHP 8.1+ required
20+
- Laravel 10+ compatibility maintained
21+
- Tests cover all functionality
22+
- Follows semantic versioning

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# Laravel Localized Routes
22

3-
[![GitHub release](https://img.shields.io/github/release/codezero-be/laravel-localized-routes.svg?style=flat-square)](https://github.com/codezero-be/laravel-localized-routes/releases)
4-
[![Laravel](https://img.shields.io/badge/laravel-11-red?style=flat-square&logo=laravel&logoColor=white)](https://laravel.com)
5-
[![License](https://img.shields.io/packagist/l/codezero/laravel-localized-routes.svg?style=flat-square)](LICENSE.md)
6-
[![Build Status](https://img.shields.io/github/actions/workflow/status/codezero-be/laravel-localized-routes/run-tests.yml?style=flat-square&logo=github&logoColor=white&label=tests)](https://github.com/codezero-be/laravel-localized-routes/actions)
7-
[![Code Coverage](https://img.shields.io/codacy/coverage/a5db8a1321664e67900c96eadc575ece/master?style=flat-square)](https://app.codacy.com/gh/codezero-be/laravel-localized-routes)
8-
[![Code Quality](https://img.shields.io/codacy/grade/a5db8a1321664e67900c96eadc575ece/master?style=flat-square)](https://app.codacy.com/gh/codezero-be/laravel-localized-routes)
9-
[![Total Downloads](https://img.shields.io/packagist/dt/codezero/laravel-localized-routes.svg?style=flat-square)](https://packagist.org/packages/codezero/laravel-localized-routes)
3+
[![GitHub release](https://img.shields.io/github/release/opgginc/codezero-laravel-localized-routes.svg?style=flat-square)](https://github.com/opgginc/codezero-laravel-localized-routes/releases)
4+
[![Laravel](https://img.shields.io/badge/laravel-12-red?style=flat-square&logo=laravel&logoColor=white)](https://laravel.com)
5+
[![License](https://img.shields.io/packagist/l/opgginc/codezero-laravel-localized-routes.svg?style=flat-square)](LICENSE.md)
6+
[![Build Status](https://img.shields.io/github/actions/workflow/status/opgginc/codezero-laravel-localized-routes/run-tests.yml?style=flat-square&logo=github&logoColor=white&label=tests)](https://github.com/opgginc/codezero-laravel-localized-routes/actions)
7+
[![Total Downloads](https://img.shields.io/packagist/dt/opgginc/codezero-laravel-localized-routes.svg?style=flat-square)](https://packagist.org/packages/opgginc/codezero-laravel-localized-routes)
108

119
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R3UQ8V)
1210

1311
A convenient way to set up and use localized routes in a Laravel app.
1412

13+
## Important Note
14+
15+
This package is a fork of the original [codezero/laravel-localized-routes](https://github.com/codezero-be/laravel-localized-routes) created by Ivan Vermeyen. It was forked by OP.GG Inc. to maintain and extend its functionality after the unfortunate passing of Ivan. We are deeply grateful for Ivan's contribution to the Laravel community and hope to honor his legacy by continuing to maintain this package. Rest in peace, Ivan.
16+
1517
## 📖 Table of Contents
1618

1719
- [Requirements](#-requirements)
@@ -53,8 +55,8 @@ A convenient way to set up and use localized routes in a Laravel app.
5355

5456
## ✅ Requirements
5557

56-
- PHP >= 8.1
57-
- Laravel >= 10
58+
- PHP >= 8.1, >= 8.4
59+
- Laravel >= 10, >= 12
5860
- Composer ^2.3 (for [codezero/composer-preload-files](https://github.com/codezero-be/composer-preload-files))
5961

6062
## ⬆ Upgrade
@@ -67,7 +69,7 @@ Check our [upgrade guide](UPGRADE.md) for instructions.
6769
Install this package with Composer:
6870

6971
```bash
70-
composer require codezero/laravel-localized-routes
72+
composer require opgginc/codezero-laravel-localized-routes
7173
```
7274

7375
Laravel will automatically register the ServiceProvider.
@@ -159,7 +161,7 @@ Make sure to add it after `StartSession` and before `SubstituteBindings`.
159161
The order of the middleware is important if you are using localized route keys (translated slugs)!
160162
The session needs to be active when setting the locale, and the locale needs to be set when substituting the route bindings.
161163

162-
### Laravel 11 and newer:
164+
### Laravel 11 and 12:
163165

164166
Add the middleware to the `web` middleware group in `bootstrap/app.php`.
165167

@@ -304,7 +306,7 @@ public function resolveRouteBinding($value, $field = null)
304306
305307
### ☑ Translate Hard-Coded URI Slugs
306308

307-
This package includes [codezero/laravel-uri-translator](https://github.com/codezero-be/laravel-uri-translator).
309+
This package includes [opgginc/codezero-laravel-uri-translator](https://github.com/opgginc/codezero-laravel-uri-translator).
308310
This registers a `Lang::uri()` macro that enables you to translate individual, hard-coded URI slugs.
309311
Route parameters will not be translated by this macro.
310312

@@ -752,16 +754,17 @@ composer test
752754
## ☕ Credits
753755

754756
- [Ivan Vermeyen](https://github.com/ivanvermeyen)
755-
- [All contributors](https://github.com/codezero-be/laravel-localized-routes/contributors)
757+
- [OP.GG Inc.](https://github.com/opgginc)
758+
- [All contributors](https://github.com/opgginc/codezero-laravel-localized-routes/contributors)
756759

757760
## 🔒 Security
758761

759-
If you discover any security related issues, please [e-mail me](mailto:ivan@codezero.be) instead of using the issue tracker.
762+
If you discover any security related issues, please contact us via GitHub issues.
760763

761764
## 📑 Changelog
762765

763766
A complete list of all notable changes to this package can be found on the
764-
[releases page](https://github.com/codezero-be/laravel-localized-routes/releases).
767+
[releases page](https://github.com/opgginc/codezero-laravel-localized-routes/releases).
765768

766769
## 📜 License
767770

UPGRADE.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
11
# Upgrade Guide
22

3+
## Upgrading To 5.0 From 4.x
4+
5+
### ➡ Package Name Changed
6+
7+
The package name has been changed from `codezero/laravel-localized-routes` to `opgginc/codezero-laravel-localized-routes`.
8+
9+
🔸 **Actions Required**
10+
11+
- Update the package using Composer: `composer require opgginc/codezero-laravel-localized-routes`
12+
13+
### ➡ Added Support for Laravel 12 and PHP 8.4
14+
15+
This package now supports Laravel 12 and PHP 8.4.
16+
17+
- The dependency `codezero/laravel-uri-translator` has been replaced with `opgginc/codezero-laravel-uri-translator`.
18+
19+
🔸 **Actions Required**
20+
21+
- If you are directly using `codezero/laravel-uri-translator`, update it to `opgginc/codezero-laravel-uri-translator`.
22+
23+
---
24+
325
## Upgrading To 4.0 From 3.x
426

527
### ➡ Minimum Requirements Updated
628

7-
Due to PHP and PHPUnit version constraints with Laravel 11, we dropped support for Laravel 7.x, 8.x and 9.x.
29+
Due to PHP and PHPUnit version constraints with Laravel 11+, we dropped support for Laravel 7.x, 8.x and 9.x.
830

9-
- The minimum PHP version required is now 8.1
10-
- The minimum Laravel version required is now 10
31+
- The minimum PHP version required is now 8.1 (and supports PHP 8.4)
32+
- The minimum Laravel version required is now 10 (and supports Laravel 12)
1133

1234
---
1335

@@ -18,7 +40,7 @@ This is now handled in `bootstrap/app.php`.
1840

1941
🔸 **Actions Required**
2042

21-
If you use Laravel 11, register the middleware in `bootstrap/app.php` as described in the README.
43+
If you use Laravel 11 or 12, register the middleware in `bootstrap/app.php` as described in the README.
2244

2345
## Upgrading To 3.0 From 2.x
2446

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "codezero/laravel-localized-routes",
2+
"name": "opgginc/codezero-laravel-localized-routes",
33
"description": "A convenient way to set up, manage and use localized routes in a Laravel app.",
44
"keywords": [
55
"php",
@@ -20,17 +20,17 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^8.1",
23+
"php": "^8.1|^8.4",
2424
"codezero/browser-locale": "^3.0",
2525
"codezero/composer-preload-files": "^1.0",
26-
"codezero/laravel-uri-translator": "^2.0",
26+
"opgginc/codezero-laravel-uri-translator": "^2.0",
2727
"codezero/php-url-builder": "^1.0",
28-
"illuminate/support": "^10.0|^11.0"
28+
"illuminate/support": "^10.0|^11.0|^12.0"
2929
},
3030
"require-dev": {
3131
"mockery/mockery": "^1.3.3",
32-
"orchestra/testbench": "^8.0|^9.0",
33-
"phpunit/phpunit": "^10.5"
32+
"orchestra/testbench": "^8.0|^9.0|^10.0",
33+
"phpunit/phpunit": "^10.5|^11.0"
3434
},
3535
"scripts": {
3636
"test": "phpunit"

0 commit comments

Comments
 (0)