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

[Bug]: laravel-lang/lang 15 doesn't support Laravel 10.x, so version 6.2 breaks compatibility with Laravel 10.x #185

Closed
neurotools opened this issue May 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working common Issue related to the "laravel-lang/common" package

Comments

@neurotools
Copy link

Lang Package Name

laravel-lang/common

Lang Package Version

6.2

Laravel Framework Version

10.48.10

PHP Version

8.3.7

Dependencies

"require": {
        "php": "^8.1",
        "anhskohbo/no-captcha": "^3.6",
        "aws/aws-sdk-php-laravel": "^3.9.0",
        "dyrynda/laravel-cascade-soft-deletes": "^4.4.0",
        "guzzlehttp/guzzle": "^7.8.1",
        "laravel/framework": "^10.48.10",
        "laravel/sanctum": "^3.3.3",
        "laravel/tinker": "^2.9",
        "maatwebsite/excel": "^3.1.55",
        "tcg/voyager": "^1.6.x-dev",
        "transbank/transbank-sdk": "^4.0"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": ">=3",
        "fakerphp/faker": "^1.23.1",
        "freshwork/chilean-bundle": "^2.1.4",
        "laravel-lang/common": "^6.1.0",
        "laravel/pint": "^1.15.3",
        "laravel/sail": "^1.29.1",
        "mockery/mockery": "^1.6.11",
        "nunomaduro/collision": "^7.10",
        "phpunit/phpunit": "^10.5.20",
        "spatie/laravel-ignition": "^2.7",
        "twbs/bootstrap": "^5.3.3"
    },

Issue description

The package laravel-lang/lang version 15 dropped support for Laravel 10.x

Pull request #175 added laravel-lang/lang version 15 support to laravel-lang/common package, tha was merged on 6.2, breaking translations on Laravel 10.x.

Steps to reproduce

  1. Create a new Laravel 10.x app
  2. Add laravel-lang/common 6.2
  3. Call artisan lang:add es

Only 3 php files are copied to /lang/es

  • lang/es/actions.php
  • lang/es/http-statuses.php
  • lang/es/validation.php

And 1 JSON file to /lang

  • lang/es/es.json

Expected to see:

  • lang/es/actions.php
  • lang/es/auth.php
  • lang/es/http-statuses.php
  • lang/es/pagination.php
  • lang/es/passwords.php
  • lang/es/validation.php

And for example, validation.php is missing many keys, like 'required'.

@neurotools neurotools added bug Something isn't working common Issue related to the "laravel-lang/common" package labels May 11, 2024
@neurotools neurotools changed the title [Bug]: laravel-lang/lang 15 doesn't support Laravel 10.x, so it's 6.2 breaks compatibility with Laravel 10.x [Bug]: laravel-lang/lang 15 doesn't support Laravel 10.x, so version 6.2 breaks compatibility with Laravel 10.x May 11, 2024
@andrey-helldar
Copy link
Member

andrey-helldar commented May 11, 2024

It's not a bug. It's a version difference. Yes, Common 6 supports Laravel 10 and 11, but the Lang package it installs is version-separated:

  • 14.0 - Laravel 10, 11*
  • 15.0 - Laravel 11

So, to correctly install dependencies for a previous version of Laravel, you need to run an additional console command:

composer require --dev laravel-lang/lang:^14.0

Related issue: #181

Thank you for your report!

@andrey-helldar
Copy link
Member

We have added this information to the documentation.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working common Issue related to the "laravel-lang/common" package
Projects
None yet
Development

No branches or pull requests

2 participants