lucidarch/lucid

Deprecated code on `lucid init:micro`

cweagans opened this issue · 5 comments

PHP 8.1, Laravel 9

I just added Lucid to my project and ran lucid init:micro and got this:

Initializing Lucid Micro for Laravel 9.0.0

Created directories:
/app/Data
/app/Domains
/app/Features
/app/Operations
/app/Data/Models
/tests/Domains
/tests/Operations
PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/vendor/laravel/
framework/src/Illuminate/Support/Str.php on line 637

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/vendor/laravel/frame
work/src/Illuminate/Support/Str.php on line 637

You're all set to build something awesome that scales!

Here are some examples to get you started:

You may wish to start with a feature
lucid make:feature LoginUser
will generate app/Features/LoginUserFeature.php

Or a job to do a single thing
lucid make:job GetUserByEmail User
will generate app/Domains/User/Jobs/GetUserByEmailJob.php

For more Job examples check out Lucid's built-in jobs:
- Lucid\Domains\Http\Jobs\RespondWithJsonJob
for consistent JSON structure responses.

- Lucid\Domains\Http\Jobs\RespondWithJsonErrorJob
for consistent JSON error responses.

- Lucid\Domains\Http\Jobs\RespondWithViewJob
basic view and data response functionality.

Finally you can group multiple jobs in an operation
lucid make:operation ProcessUserLogin
will generate app/Operations/ProcessUserLoginOperation.php

For more details, help yourself with the docs at https://docs.lucidarch.dev

Remember to enjoy the journey.
Cheers!

is it abandoned?

@jEstevezRod no, and way too far from being so 😄 just short on time these days.

@cweagans thanks for reporting! I will look into this sometime this week.

Hello. When you will fix it? We will start to new project with lucid.
Bug in the Str.php. You can fix it like that

public static function studly($value)
    {
        return $value ? LaravelStr::studly($value) : value;
    }

public static function snake($value, $delimiter = '_')
    {
        return $value ? LaravelStr::snake($value, $delimiter) : value;
    }

@Mulkave Will there be support for PHP 8.2 and Laravel 10?

Feel free to use my fork https://github.com/ksimenic/lucid. It has all optimizations for Laravel 10 and no more deprecated code in init:micro.

All you need to do is to add following in your composer.json

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/ksimenic/lucid"
        }
    ],

and then require

"lucidarch/lucid": "dev-latest"