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

Error while parsing operation name ending with "p". #26

Open
ozamorowski opened this issue Nov 10, 2023 · 0 comments
Open

Error while parsing operation name ending with "p". #26

ozamorowski opened this issue Nov 10, 2023 · 0 comments

Comments

@ozamorowski
Copy link

ozamorowski commented Nov 10, 2023

Hello.

This package is great, but today I run into small problem.

When running single operation with name provided
sail artisan operations:process 2023_11_10_170704_add_products_to_b2b_group.php

I got an error:
ERROR File 2023_11_10_170704_add_products_to_b2b_grou.php does not exist.

Note that file name in error message is missing last "p".

The problem most probably exists in /src/Commands/OneTimeOperationsProcessCommand.php on line 63 with rtrim function:

protected function proccessSingleOperation(string $providedOperationName): int
    {
        $providedOperationName = str($providedOperationName)->rtrim('.php')->toString();

I've found similar issue on stackoverflow: https://stackoverflow.com/questions/19473603/php-rtrim-php suggesting that we can use preg_replace("/(.+)\.php$/", "$1", $filename); or basename($filename, '.php') functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant