A PHP framework for console artisans

Overview

Build Status Total Downloads Latest Stable Version License

This is a community project and not an official Laravel one

Laravel Zero was created by, and is maintained by Nuno Maduro, and is a micro-framework that provides an elegant starting point for your console application. It is an unofficial and customized version of Laravel optimized for building command-line applications.


Documentation

For full documentation, visit laravel-zero.com.

Support the development

Do you like this project? Support it by donating

License

Laravel Zero is an open-source software licensed under the MIT license.

Comments
  • Cannot install

    Cannot install

    Whenever i try to install

    ➜  hello composer global require laravel-zero/installer
    Changed current directory to /Users/shirshak/.composer
    Using version ^1.1 for laravel-zero/installer
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Conclusion: don't install laravel-zero/installer v1.1.7
        - Conclusion: don't install laravel-zero/installer v1.1.6
        - Conclusion: don't install laravel-zero/installer v1.1.5
        - Conclusion: don't install laravel-zero/installer v1.1.4
        - Conclusion: don't install laravel-zero/installer v1.1.3
        - Conclusion: don't install laravel-zero/installer v1.1.2
        - Conclusion: don't install laravel-zero/installer v1.1.1
        - Conclusion: remove symfony/console v4.0.2
        - Installation request for laravel-zero/installer ^1.1 -> satisfiable by laravel-zero/installer[v1.1.0, v1.1.1, v1.1.2, v1.1.3, v1.1.4, v1.1.5, v1.1.6, v1.1.7].
        - Conclusion: don't install symfony/console v4.0.2
        - laravel-zero/installer v1.1.0 requires laravel-zero/framework ~3.6 -> satisfiable by laravel-zero/framework[v3.10.0, v3.6.0, v3.6.1, v3.6.10, v3.6.11, v3.6.12, v3.6.2, v3.6.3, v3.6.4, v3.6.5, v3.7.0, v3.7.1, v3.7.2, v3.8.0, v3.8.1, v3.8.2, v3.9.0, v3.9.1, v3.9.2].
        - laravel-zero/framework v3.10.0 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.0 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.1 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.10 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.11 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.12 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.2 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.3 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.4 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.6.5 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.7.0 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.7.1 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.7.2 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.8.0 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.8.1 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.8.2 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.9.0 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.9.1 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - laravel-zero/framework v3.9.2 requires illuminate/console 5.5.* -> satisfiable by illuminate/console[v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28].
        - illuminate/console v5.5.0 requires symfony/console ~3.3 -> satisfiable by symfony/console[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2].
        - illuminate/console v5.5.16 requires symfony/console ~3.3 -> satisfiable by symfony/console[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2].
        - illuminate/console v5.5.17 requires symfony/console ~3.3 -> satisfiable by symfony/console[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2].
        - illuminate/console v5.5.2 requires symfony/console ~3.3 -> satisfiable by symfony/console[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2].
        - illuminate/console v5.5.28 requires symfony/console ~3.3 -> satisfiable by symfony/console[v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.2].
        - Can only install one of: symfony/console[v3.3.0, v4.0.2].
        - Can only install one of: symfony/console[v3.3.1, v4.0.2].
        - Can only install one of: symfony/console[v3.3.10, v4.0.2].
        - Can only install one of: symfony/console[v3.3.11, v4.0.2].
        - Can only install one of: symfony/console[v3.3.12, v4.0.2].
        - Can only install one of: symfony/console[v3.3.13, v4.0.2].
        - Can only install one of: symfony/console[v3.3.14, v4.0.2].
        - Can only install one of: symfony/console[v3.3.2, v4.0.2].
        - Can only install one of: symfony/console[v3.3.3, v4.0.2].
        - Can only install one of: symfony/console[v3.3.4, v4.0.2].
        - Can only install one of: symfony/console[v3.3.5, v4.0.2].
        - Can only install one of: symfony/console[v3.3.6, v4.0.2].
        - Can only install one of: symfony/console[v3.3.7, v4.0.2].
        - Can only install one of: symfony/console[v3.3.8, v4.0.2].
        - Can only install one of: symfony/console[v3.3.9, v4.0.2].
        - Can only install one of: symfony/console[v3.4.0, v4.0.2].
        - Can only install one of: symfony/console[v3.4.1, v4.0.2].
        - Can only install one of: symfony/console[v3.4.2, v4.0.2].
        - Installation request for symfony/console (locked at v4.0.2) -> satisfiable by symfony/console[v4.0.2].
    
    
    Installation failed, reverting ./composer.json to its original content.
    
    opened by shirshak55 47
  • Laravel-Zero + Eloquent And Other current Laravel Stuff

    Laravel-Zero + Eloquent And Other current Laravel Stuff

    Hi,

    We can add to the dependencies and use things like Eloquent? Will be needed something extra or only add the dependency and de config/database.php file?

    help wanted question 
    opened by allanfreitas 24
  • [5.8] Add notifications component

    [5.8] Add notifications component

    Hi, Can I use laravel notifications introduced in laravel 5.3 as described here? https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/9 Please advice. Thanks much

    enhancement 
    opened by nroussis 23
  • [5.8] Assert that command was called

    [5.8] Assert that command was called

    (Moved from #99)

    Would be great to have an easy way of asserting that a specific command was called.

    The use case is that I have a command A, which cascades into command B and command C. Command B and Command C are already covered in other tests, but I want to make sure that when I call command A, command B and command C are called as well.

    After doing a quick scan, I can think of three directions currently:

    1. Inspired by Event::fake(), wrap Illuminate\Command in a spy when using Command:spy helper. Then use a assertCommandCalled($command, ?$callback) test helper for asserting. It seems impossible to me to go a level deeper because then we get into Symphony territory. (The Event::fake() solution doesn't use a Mockery spy, but mimics its functionality anyway).

    2. Add lifecycle Events to the Command calls (like Eloquent model has) and track these using Event::fake() and Event::assertDispatched(...)

    3. Do both. But that's a bit much atm.

    What do you think?

    enhancement proposal 
    opened by sandervanhooft 22
  • [Question] How to pass all command line parameters

    [Question] How to pass all command line parameters

    Assuming I have the following

    $ cli app:start -d -v -q
    
    or
    
    $ cli app:start -dvq
    

    How can I setup the command to pass along the command line options

        ... signature ...
        protected $signature = 'app:start {-d: debug, -v: verbose, -q: quiet}';
    
    question 
    opened by mikeerickson 22
  • How to hide all artisan commands except the ones created with this tool

    How to hide all artisan commands except the ones created with this tool

    I am looking for a way to hide all the commands (see screenshot, those outlined with red) and only show the commands I have created for our CLI (again, see screenshot, those outlined in green)

    image

    opened by mfour-merickson 19
  • Replacing IOC bindings in tests doesn't work

    Replacing IOC bindings in tests doesn't work

    I'm having some issues while trying to replace IOC bindings with my own (mocked) versions in tests. This is my situation:

    I have a TestService.php with one method in it (someMethod) that just returns a string to signify it's coming from the actual (non-mocked) version of the class: https://github.com/svenluijten/laravel-zero-ioc-test/blob/master/app/TestService.php.

    This service is injected in the container in the AppServiceProvider without anything special.

    In the HelloCommand class I'm injecting that service into the container and dumping the result of ->someMethod() in the handle method. Pretty straight forward, right?

    In my test, all I'm doing is creating a mock of that service and configuring it so that ->someMethod() returns from tests to indicate that it's the mocked version that we're using.

    That mock is then injected into the service container using app()->instance(...);, after which the command that has the service injected into it is called.

    I would expect the dumped result to be from tests, because it would have grabbed the mock from the service container instead of the "standard" implementation (registered via the AppServiceProvider).

    Instead, I get the result from the actual class!! I honestly have no idea where to even begin looking with this issue 😖

    opened by svenluijten 19
  • ErrorException : rename(): No such file or directory while building a PHAR archive

    ErrorException : rename(): No such file or directory while building a PHAR archive

    When I ran this command php weather app:build I got this exception ErrorException : rename(/vagrant/code/testApp/weather.phar,/vagrant/code/testApp/builds/weather): No such file or directory.

    I believe when we named our application there is a file being created with the application name in the root directory but not with .phar extension. Seems like the Filesystem::move() method which is calling rename() method is trying to access the .phar file and unable to find that file.

    bug 
    opened by svallamsetti 18
  • [5.8] Adding a built-in self-update command

    [5.8] Adding a built-in self-update command

    It would be great to have a self-update command built-in to laravel-zero. I've targetted 5.8 - which may be enough time? Have added this issue on @nunomaduro 's request.

    I've developed one for a recent project using a trait/interface to implement it - you can review the code at https://github.com/hnhdigital-os/laravel-console-self-update.

    Flexibility is key in providing this particular command as each project will have very different approaches to how/where they store the updated binaries. In a non-laravel-zero project, I store them in a private s3 repo - so using flysystem adapter is an important feature.

    The package I've developed has configurability round most of what would be needed and this is currently implemented through set methods.

    Changes I'd look at to bring it into the fold:

    • Use a config file with environment file (non-master branch or if the project is forked)
    • Use guzzle for standard public url access (only using file_get_contents)
    • 100% tested
    • Provide scripts to generate the files needed (eg versions, hash)
    proposal 
    opened by RoccoHoward 17
  • Cannot build since PHP 8.1

    Cannot build since PHP 8.1

    Hello, I've got a simple app I cannot build anymore since homebrew upgraded PHP to latest 8.1 version.

    It seems it's a box issue, but I really don't know what I can do in order to fix it

    ❯ ./nas app:build
    
    
                    Building process
    
    
     Build version? [unreleased]:
     >
    
       1. Moving application to production mode: ✔
       2. Compile into a single file: ✔
    
    
       ErrorException
    
      rename(/Users/loranger/Developer/projects/nas-cli/nas.phar,/Users/loranger/Developer/projects/nas-cli/builds/nas): No such file or directory
    
      at vendor/illuminate/filesystem/Filesystem.php:305
        301▕      * @return bool
        302▕      */
        303▕     public function move($path, $target)
        304▕     {
      ➜ 305▕         return rename($path, $target);
        306▕     }
        307▕
        308▕     /**
        309▕      * Copy a file to a new location.
    
          +20 vendor frames
      21  nas:37
          LaravelZero\Framework\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
    composer.json
        "require": {
            "php": "^7.3|^8.0",
            "laravel-zero/framework": "^8.8",
            "titasgailius/terminal": "^1"
        },
        "require-dev": {
            "mockery/mockery": "^1.4.3",
            "pestphp/pest": "^1.3"
        },
    
    box.json
    {
        "chmod": "0755",
        "directories": [
            "app",
            "bootstrap",
            "config",
            "vendor"
        ],
        "files": [
            "composer.json"
        ],
        "exclude-composer-files": false,
        "compression": "GZ",
        "compactors": [
            "KevinGH\\Box\\Compactor\\Php",
            "KevinGH\\Box\\Compactor\\Json"
        ]
    }
    
    ./nas app:build -v
    ❯ ./nas app:build -v
    
    
                    Building process
    
    
     Build version? [unreleased]:
     >
    
       1. Moving application to production mode: ✔
    
    PHP Deprecated:  Return type of HumbugBox3130\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/src/RequirementCollection.php on line 12
    PHP Deprecated:  Return type of HumbugBox3130\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/src/RequirementCollection.php on line 16
    
    
    Deprecated: Return type of HumbugBox3130\KevinGH\RequirementChecker\RequirementCollection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/src/RequirementCollection.php on line 12
    
    Deprecated: Return type of HumbugBox3130\KevinGH\RequirementChecker\RequirementCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/src/RequirementCollection.php on line 16
    
    
    Deprecated: Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 162
    
    Deprecated: Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 141
    
    Deprecated: Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 155
    
    Deprecated: Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 148
    
    Deprecated: Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 136
    
    PHP Deprecated:  Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 162
    PHP Deprecated:  Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 141
    PHP Deprecated:  Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 155
    PHP Deprecated:  Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 148
    PHP Deprecated:  Return type of _HumbugBox113887eee2b6\iter\rewindable\_RewindableGenerator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/nikic/iter/src/iter.rewindable.php on line 136
    
    
    Deprecated: Return type of _HumbugBox113887eee2b6\Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/finder/Finder.php on line 220
    
    Deprecated: Return type of _HumbugBox113887eee2b6\Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/finder/Finder.php on line 271
    
    PHP Deprecated:  Return type of _HumbugBox113887eee2b6\Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/finder/Finder.php on line 220
    PHP Deprecated:  Return type of _HumbugBox113887eee2b6\Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/finder/Finder.php on line 271
    
    
    Fatal error: During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of _HumbugBox113887eee2b6\Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Helper/HelperSet.php:44
    Stack trace:
    #0 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Helper/HelperSet.php(7): _HumbugBox113887eee2b6\KevinGH\Box\{closure}(8192, 'Return type of ...', 'phar:///Users/l...', 44)
    #1 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/vendor/composer/ClassLoader.php(478): include('phar:///Users/l...')
    #2 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('phar:///Users/l...')
    #3 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(682): Composer\Autoload\ClassLoader->loadClass('_HumbugBox11388...')
    #4 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/src/Console/Application.php(56): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->getDefaultHelperSet()
    #5 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(204): _HumbugBox113887eee2b6\KevinGH\Box\Console\Application->getDefaultHelperSet()
    #6 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Command/Command.php(55): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->getHelperSet()
    #7 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(283): _HumbugBox113887eee2b6\Symfony\Component\Console\Command\Command->setApplication(Object(_HumbugBox113887eee2b6\KevinGH\Box\Console\Application))
    #8 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(787): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->add(Object(_HumbugBox113887eee2b6\Symfony\Component\Console\Command\HelpCommand))
    #9 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(362): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->init()
    #10 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(163): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->find('compile')
    #11 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(101): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->doRun(Object(_HumbugBox113887eee2b6\Symfony\Component\Console\Input\ArgvInput), Object(_HumbugBox113887eee2b6\Symfony\Component\Console\Output\ConsoleOutput))
    #12 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/bin/box(41): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->run()
    #13 /Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box(18): require('phar:///Users/l...')
    #14 {main} in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Helper/HelperSet.php on line 7
    
    PHP Fatal error:  During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of _HumbugBox113887eee2b6\Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Helper/HelperSet.php:44
    Stack trace:
    #0 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Helper/HelperSet.php(7): _HumbugBox113887eee2b6\KevinGH\Box\{closure}(8192, 'Return type of ...', 'phar:///Users/l...', 44)
    #1 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/vendor/composer/ClassLoader.php(478): include('phar:///Users/l...')
    #2 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile('phar:///Users/l...')
    #3 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(682): Composer\Autoload\ClassLoader->loadClass('_HumbugBox11388...')
    #4 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/src/Console/Application.php(56): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->getDefaultHelperSet()
    #5 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(204): _HumbugBox113887eee2b6\KevinGH\Box\Console\Application->getDefaultHelperSet()
    #6 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Command/Command.php(55): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->getHelperSet()
    #7 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(283): _HumbugBox113887eee2b6\Symfony\Component\Console\Command\Command->setApplication(Object(_HumbugBox113887eee2b6\KevinGH\Box\Console\Application))
    #8 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(787): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->add(Object(_HumbugBox113887eee2b6\Symfony\Component\Console\Command\HelpCommand))
    #9 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(362): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->init()
    #10 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(163): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->find('compile')
    #11 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php(101): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->doRun(Object(_HumbugBox113887eee2b6\Symfony\Component\Console\Input\ArgvInput), Object(_HumbugBox113887eee2b6\Symfony\Component\Console\Output\ConsoleOutput))
    #12 phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/bin/box(41): _HumbugBox113887eee2b6\Symfony\Component\Console\Application->run()
    #13 /Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box(18): require('phar:///Users/l...')
    #14 {main} in phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Helper/HelperSet.php on line 7
       2. Compile into a single file: ✔
    
    
       ErrorException
    
      rename(/Users/loranger/Developer/projects/nas-cli/nas.phar,/Users/loranger/Developer/projects/nas-cli/builds/nas): No such file or directory
    
      at vendor/illuminate/filesystem/Filesystem.php:305
        301▕      * @return bool
        302▕      */
        303▕     public function move($path, $target)
        304▕     {
      ➜ 305▕         return rename($path, $target);
        306▕     }
        307▕
        308▕     /**
        309▕      * Copy a file to a new location.
    
      1   vendor/illuminate/filesystem/Filesystem.php:305
          rename("/Users/loranger/Developer/projects/nas-cli/nas.phar", "/Users/loranger/Developer/projects/nas-cli/builds/nas")
    
      2   vendor/illuminate/support/Facades/Facade.php:261
          Illuminate\Filesystem\Filesystem::move("/Users/loranger/Developer/projects/nas-cli/nas.phar", "/Users/loranger/Developer/projects/nas-cli/builds/nas")
    
      3   vendor/laravel-zero/framework/src/Commands/BuildCommand.php:143
          Illuminate\Support\Facades\Facade::__callStatic("move")
    
      4   vendor/laravel-zero/framework/src/Commands/BuildCommand.php:93
          LaravelZero\Framework\Commands\BuildCommand::compile("nas")
    
      5   vendor/laravel-zero/framework/src/Commands/BuildCommand.php:71
          LaravelZero\Framework\Commands\BuildCommand::build("nas")
    
      6   vendor/illuminate/container/BoundMethod.php:36
          LaravelZero\Framework\Commands\BuildCommand::handle()
    
      7   vendor/illuminate/container/Util.php:40
          Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    
      8   vendor/illuminate/container/BoundMethod.php:93
          Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
    
      9   vendor/illuminate/container/BoundMethod.php:37
          Illuminate\Container\BoundMethod::callBoundMethod(Object(LaravelZero\Framework\Application), Object(Closure))
    
      10  vendor/illuminate/container/Container.php:653
          Illuminate\Container\BoundMethod::call(Object(LaravelZero\Framework\Application), [])
    
      11  vendor/illuminate/console/Command.php:136
          Illuminate\Container\Container::call()
    
      12  vendor/symfony/console/Command/Command.php:298
          Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
    
      13  vendor/illuminate/console/Command.php:121
          Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
    
      14  vendor/laravel-zero/framework/src/Commands/BuildCommand.php:79
          Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      15  vendor/symfony/console/Application.php:1005
          LaravelZero\Framework\Commands\BuildCommand::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      16  vendor/symfony/console/Application.php:299
          Symfony\Component\Console\Application::doRunCommand(Object(LaravelZero\Framework\Commands\BuildCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      17  vendor/symfony/console/Application.php:171
          Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      18  vendor/illuminate/console/Application.php:94
          Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      19  vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php:129
          Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      20  vendor/laravel-zero/framework/src/Kernel.php:91
          Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      21  nas:37
          LaravelZero\Framework\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
    
    opened by loranger 16
  • [5.7] Make some core packages optional

    [5.7] Make some core packages optional

    Good day! First I want to say thank you very much for the excellent framework, I use it now to create a console application. Is it possible to move all noncritical dependencies from the framework to the application skeleton? Like: "nunomaduro/laravel-console-menu":"1.0.*" . Console menu not working on Windows due to the fact that POSIX will not install on Windows. And it would be nice to make the option of choosing these dependencies in final app. I am also using symfony/filesystem instead of league/flysystem because I need the absolute path to the file.

    enhancement proposal 
    opened by zorca 16
  • Cannot build, “No such file or directory”

    Cannot build, “No such file or directory”

    Hi,

    My existing working app stopped working since my PHP bumped from 8.1 to 8.2 because of Carbon:

    In Creator.php line 928:
    
      Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type a
      rray, bool given, called in phar:///usr/local/sbin/nas/vendor/nesbot/carbon
      /src/Carbon/Traits/Creator.php on line 98
    

    So I went to my project, and composer update every dependencies.

    Now the Carbon error disappeared but I cannot build anymore, it seems I can't create any phar but I can't figure out why:

    compose.json
    {
        "name": "laravel-zero/laravel-zero",
        "description": "The Laravel Zero Framework.",
        "keywords": ["framework", "laravel", "laravel zero", "console", "cli"],
        "homepage": "https://laravel-zero.com",
        "type": "project",
        "license": "MIT",
        "support": {
            "issues": "https://github.com/laravel-zero/laravel-zero/issues",
            "source": "https://github.com/laravel-zero/laravel-zero"
        },
        "authors": [
            {
                "name": "Nuno Maduro",
                "email": "[email protected]"
            }
        ],
        "require": {
            "php": "^7.3|^8.0",
            "laravel-zero/framework": "^9.0",
            "titasgailius/terminal": "^1.0"
        },
        "require-dev": {
            "mockery/mockery": "^1.4.3",
            "pestphp/pest": "^1.3"
        },
        "autoload": {
            "psr-4": {
                "App\\": "app/"
            }
        },
        "autoload-dev": {
            "psr-4": {
                "Tests\\": "tests/"
            }
        },
        "config": {
            "preferred-install": "dist",
            "sort-packages": true,
            "optimize-autoloader": true,
            "allow-plugins": {
                "pestphp/pest-plugin": true
            }
        },
        "minimum-stability": "dev",
        "prefer-stable": true,
        "bin": ["nas"]
    }
    
    box.json
    {
        "chmod": "0755",
        "directories": [
            "app",
            "bootstrap",
            "config",
            "vendor"
        ],
        "files": [
            "composer.json"
        ],
        "exclude-composer-files": false,
        "compression": "GZ",
        "compactors": [
            "KevinGH\\Box\\Compactor\\Php",
            "KevinGH\\Box\\Compactor\\Json"
        ]
    }
    
    
    output
    
                                                    
                    Building process                
                                                    
    
     Build version? [unreleased]:
     > 
       1. Moving application to production mode: loading...
       1. Moving application to production mode: ✔
    
    Box Requirements Checker
    ========================
    
    > Using PHP 8.2.0
    
    > PHP is using the following php.ini file:
      /opt/homebrew/etc/php/8.2/php.ini
    
    > Checking Box requirements:
      ✔ The application requires the version "^7.4 || ^8.0" or greater.
      ✔ The application requires the extension "zlib".
      ✔ The application requires the extension "phar".
      ✔ The package "nikic/php-parser" requires the extension "tokenizer".
      ✔ The package "phpdocumentor/reflection-docblock" requires the extension
    "filter".
      
                                                                                    
     [OK] Your system is ready to run the application.                              
                                                                                    
    
    
    
    
    In DumpCompletionCommand.php line 48:
                                                                 
      [ErrorException]                                           
    
      Using ${var} in strings is deprecated, use {$var} instead  
                                                                 
    
    Exception trace:
      at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Command/DumpCompletionCommand.php:48
    
     KevinGH\Box\{closure}() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/vendor/composer/ClassLoader.php:571
     include() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/vendor/composer/ClassLoader.php:571
     Composer\Autoload\includeFile() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/.box/vendor/composer/ClassLoader.php:428
    
     Composer\Autoload\ClassLoader->loadClass() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php:1092
     Symfony\Component\Console\Application->getDefaultCommands() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/src/Console/Application.php:83
     KevinGH\Box\Console\Application->getDefaultCommands() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php:1272
     Symfony\Component\Console\Application->init() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php:662
    
     Symfony\Component\Console\Application->find() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php:259
     Symfony\Component\Console\Application->doRun() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/vendor/symfony/console/Application.php:171
     Symfony\Component\Console\Application->run() at phar:///Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box/bin/box:52
     require() at /Users/loranger/Developer/projects/nas-cli/vendor/laravel-zero/framework/bin/box:18
    
    
       2. Compile into a single file: loading...
       2. Compile into a single file: ✔
    
    
       ErrorException 
    
      rename(/Users/loranger/Developer/projects/nas-cli/nas.phar,/Users/loranger/Developer/projects/nas-cli/builds/nas): No such file or directory
    
      at vendor/illuminate/filesystem/Filesystem.php:310
        306▕      * @return bool
        307▕      */
        308▕     public function move($path, $target)
        309▕     {
      ➜ 310▕         return rename($path, $target);
        311▕     }
        312▕ 
        313▕     /**
        314▕      * Copy a file to a new location.
    
      1   vendor/illuminate/filesystem/Filesystem.php:310
          rename("/Users/loranger/Developer/projects/nas-cli/nas.phar", "/Users/loranger/Developer/projects/nas-cli/builds/nas")
    
      2   vendor/illuminate/support/Facades/Facade.php:338
          Illuminate\Filesystem\Filesystem::move("/Users/loranger/Developer/projects/nas-cli/nas.phar", "/Users/loranger/Developer/projects/nas-cli/builds/nas")
    
      3   vendor/laravel-zero/framework/src/Commands/BuildCommand.php:143
          Illuminate\Support\Facades\Facade::__callStatic("move")
    
      4   vendor/laravel-zero/framework/src/Commands/BuildCommand.php:93
          LaravelZero\Framework\Commands\BuildCommand::compile("nas")
    
      5   vendor/laravel-zero/framework/src/Commands/BuildCommand.php:71
          LaravelZero\Framework\Commands\BuildCommand::build("nas")
    
      6   vendor/illuminate/container/BoundMethod.php:36
          LaravelZero\Framework\Commands\BuildCommand::handle()
    
      7   vendor/illuminate/container/Util.php:41
          Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    
      8   vendor/illuminate/container/BoundMethod.php:93
          Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
    
      9   vendor/illuminate/container/BoundMethod.php:35
          Illuminate\Container\BoundMethod::callBoundMethod(Object(LaravelZero\Framework\Application), Object(Closure))
    
      10  vendor/illuminate/container/Container.php:651
          Illuminate\Container\BoundMethod::call(Object(LaravelZero\Framework\Application), [])
    
      11  vendor/illuminate/console/Command.php:182
          Illuminate\Container\Container::call()
    
      12  vendor/symfony/console/Command/Command.php:312
          Illuminate\Console\Command::execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
    
      13  vendor/illuminate/console/Command.php:151
          Symfony\Component\Console\Command\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
    
      14  vendor/laravel-zero/framework/src/Commands/BuildCommand.php:79
          Illuminate\Console\Command::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      15  vendor/symfony/console/Application.php:1020
          LaravelZero\Framework\Commands\BuildCommand::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      16  vendor/symfony/console/Application.php:312
          Symfony\Component\Console\Application::doRunCommand(Object(LaravelZero\Framework\Commands\BuildCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      17  vendor/symfony/console/Application.php:168
          Symfony\Component\Console\Application::doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      18  vendor/illuminate/console/Application.php:102
          Symfony\Component\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      19  vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php:129
          Illuminate\Console\Application::run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      20  vendor/laravel-zero/framework/src/Kernel.php:96
          Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
      21  nas:35
          LaravelZero\Framework\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    
    

    What did I miss?

    opened by loranger 6
  • PHP Fatal error:  Uncaught Error: Class

    PHP Fatal error: Uncaught Error: Class "Symfony\Component\Console\Output\AnsiColorMode" not found in phar:/vendor/symfony/console/Terminal.php:18

    PHP Fatal error: Uncaught Error: Class "Symfony\Component\Console\Output\AnsiColorMode" not found in phar:/vendor/symfony/console/Terminal.php:18

    my composer.json file

    "require": { "php": "^7.3|^8.0", "illuminate/log": "^9.0", "laravel-zero/framework": "^9.0", "laminas/laminas-text": "^2.9" }, "require-dev": { "mockery/mockery": "^1.5", "phpunit/phpunit": "^9.5" }, "autoload": { "psr-4": { "App\": "app/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true }, "scripts": { "post-create-project-cmd": [ "@php application app:rename" ] },

    opened by glo45343 3
  • App does not work after build

    App does not work after build

    Basically nothing happens after my application is build by app:build command.

    My steps to reproduce:

    Input:

    composer create-project --prefer-dist laravel-zero/laravel-zero .
    php application app:rename else
    [... develop custom command `import` ...]
    php else 
    

    Output:

    unreleased
    
      USAGE: else <command> [options] [arguments]
    
      import                 Custom CSV Importer
    

    Input:

    php else app:build
    ./builds/else
    

    Output is empty

    Input:

    ./builds/else -vvv
    

    Output:

    Box Requirements Checker
    ========================
    
    > Using PHP 8.1.8
    > PHP is using the following php.ini file:
      /etc/php-cli.ini
    
    > Checking Box requirements:
      ✔ The application requires the version "^8.0" or greater.
      ✔ The application requires the extension "zlib".
      ✔ The package "brick/math" requires the extension "json".
      ✔ The package "illuminate/database" requires the extension "json".
      ✔ The package "illuminate/support" requires the extension "json".
      ✔ The package "illuminate/view" requires the extension "json".
      ✔ The package "laravel-zero/framework" requires the extension "json".
      ✔ The package "nesbot/carbon" requires the extension "json".
      ✔ The package "ramsey/uuid" requires the extension "json".
      ✔ The package "league/flysystem-ftp" requires the extension "ftp".
      ✔ The package "league/mime-type-detection" requires the extension "fileinfo".
      ✔ The package "vlucas/phpdotenv" requires the extension "pcre".
      
                                                                                                                                                                                                                    
     [OK] Your system is ready to run the application.           
    

    Expected result: My command (or any other command) possible to use after app:build

    Actual result: No command possible to use after app:build

    opened by sszymkowicz 0
  • Hashing class not found

    Hashing class not found

    image I want to run the seeder with Hash::make() function but it is not found.

    I have already imported this: use Illuminate\Support\Facades\Hash;

    but it still does not work. any ideas?

    opened by anggerari 0
  • Invalid parsing of an argument (not an option) that start with a dash ?

    Invalid parsing of an argument (not an option) that start with a dash ?

    Hey there

    I'm not sure if this is on my end or an actual issue ... this is the first time I'm using laravel zero.

    It's really awesome and I quickly started making a simple CLI app that uses Youtube API.

    So one of my commands has this at the beginning of the class:

    class GetVideoCommand extends Command
    {
      /**
       * The signature of the command.
       *
       * @var string
       */
      protected $signature = 'get-video
                                {id : the id of the video (required)}';
    

    So if I do the following it works

    ./cliapp get-video MXDF0wVcWfA
    

    However the following fails with a big red error message (turns out a lot of YouTube videoId's have a dash at the beginning):

    ./cliapp get-video -wPg1tNEWmo
    

    The error message:

    The "-w" option does not exist.
    

    Unfortunately it seems the single or double quotes do not help:

    ./cliapp get-video '-wPg1tNEWmo'
    ./cliapp get-video "-wPg1tNEWmo"
    

    Did I miss something obvious here?

    opened by fabd 1
  • [Feature request] Make it easier to style command help-text with Termwind

    [Feature request] Make it easier to style command help-text with Termwind

    If Symfony commands have a protected $help attribute defined, it will render this text in an extra "Help:" section at the bottom when invoking the command with --help. This text can be multi-line, and it doesn't have to follow any specific format.

    I was able to get Termwind to render the contents of $help like this:

    protected function configure()
    {
        parent::configure();
        $buffer = new BufferedOutput(decorated: true);
        renderUsing($buffer);
        render($this->help);
        renderUsing($this->output);
        $this->help = $buffer->fetch();
    }
    

    It would be awesome if this could be made easier, both in Zero and in regular Laravel commands.

    opened by mortenscheel 0
Releases(v2.0.13)
Owner
Laravel Zero
Laravel Zero - A PHP Framework For Console Artisans
Laravel Zero
A console noughts and crosses game written in php

Tic-tac-toe A console noughts and crosses game written in php To play, simply clone the file Navigate to the file directory on your terminal and run t

Etorojah Okon 1 Oct 13, 2021
The package contains a bootstrap for running Yii3 console application.

Yii Console Runner The package contains a bootstrap for running Yii3 console application. Requirements PHP 8.0 or higher. Installation The package cou

Yii Software 4 Oct 15, 2022
Demo of symfony/console features to build rich command line utilities

Symfony Console Demo This project is a demonstration of symfony/console features. To run the project with Docker. With bash: docker build -t myconsole

Jérôme Tamarelle 3 Jun 16, 2022
This tools helps you with Collectors in DependecyInjection, Console shortcuts, ParameterProvider as service and many more.

Package Builder This tools helps you with Collectors in DependecyInjection, Console shortcuts, ParameterProvider as service and many more. Install com

null 168 Dec 22, 2022
The plugin allows to execute math operations in the server or console.

General The plugin allows to execute math operations in the server or console with /calculator command Arithmetic Operators List of supported arithmet

NhanAZ's PocketMine-MP Plugins 3 Oct 20, 2022
The XP Framework is an all-purpose, object oriented PHP framework.

XP Framework Core This is the XP Framework's development checkout. Installation If you just want to use the XP Framework, grab a release using compose

XP-Framework 17 Dec 14, 2022
A panel created based on the Zend Framework MVC framework

?? Painel MyZap2.0 Com ZendFramework 3 Descrição Esse é um painel criado como estudo pessoal do framework (Zend Framework MVC) não foi criado para fin

Jonathan Henrique 9 Jun 10, 2022
A PHP 5.3+ and PHP 7.3 framework for OpenGraph Protocol

Opengraph Test with Atoum cd Opengraph/ curl -s https://getcomposer.org/installer | php php composer.phar install --dev ./vendor/atoum/atoum/bin/atoum

Axel Etcheverry 89 Dec 27, 2022
PHP Framework - Damian PHP - Skeleton

Damian PHP Framework - Skeleton A powerful PHP Framework in PHP 8.1 - Beautiful code & Elegant syntax This Open Source Framework is developed by Steph

Stephen Damian - Laravel Developer 2 Dec 15, 2022
A framework agnostic PHP library to build chat bots

BotMan If you want to learn how to create reusable PHP packages yourself, take a look at my upcoming PHP Package Development video course. About BotMa

BotMan 5.8k Jan 1, 2023
A framework agnostic, multi-gateway payment processing library for PHP 5.6+

Omnipay An easy to use, consistent payment processing library for PHP Omnipay is a payment processing library for PHP. It has been designed based on i

The League of Extraordinary Packages 5.7k Dec 30, 2022
Simple custom chat bot developing framework for telegram, qq and more in PHP (the best language)

RinoBot RinoBot 是一个为统一聊天机器人扩展开发的框架,编写一份插件用于多种机器人协议。 简体中文 | English ?? 开发中 ?? 暂不适用于生产环境 特性 插件扩展机制 一份代码运行于多平台多协议机器人 并减小开发难度 插件提供 Yaml 配置 供使用者修改 基于机器人 We

LixWorth 3 Apr 18, 2022
A lightweight framework-agnostic library in pure PHP for part-of-speech tagging

N-ai php pos tagger A lightweight framework-agnostic library in pure PHP for part-of-speech tagging. Can be used for chatbots, personal assistants, ke

Giorgio Rey 8 Nov 8, 2022
A hacky PHP script to download posts, images, videos and framework grading from Parent Zone

ParentZoneDownloader A hacky PHP script to download posts, images, videos and framework grading from Parent Zone Pre-Requisites Tested on PHP 7.4, but

null 2 Sep 6, 2021
Easy Repository pattern for PHP Phalcon framework.

Phalcon Repositories Introduction Phalcon Repositories lets you easily build repositories for your Phalcon models, for both SQL and Mongo drivers. PHP

Michele Angioni 18 Oct 7, 2022
Incubator adapters/functionality for the Phalcon PHP Framework

Phalcon Incubator This is a repository to publish/share/experiment with new adapters, prototypes or functionality that can potentially be incorporated

The Phalcon PHP Framework 735 Dec 27, 2022
CMS based on Phalcon PHP Framework with modular structure

Yona CMS Yona CMS - open source content management system (CMS). Written in Phalcon PHP Framework (version 3.x supported) Has a convenient modular str

Alexander Torosh 369 Dec 27, 2022
This example shows how to use Anychart library with the PHP programming language, Laravel framework and MySQL database.

PHP basic template This example shows how to use Anychart library with the PHP programming language, Laravel framework and MySQL database. Running To

AnyChart Integrations and Templates 23 Jul 17, 2022
Invo - Sample application for the Phalcon PHP Framework

INVO Application Phalcon is a web framework delivered as a C extension providing high performance and lower resource consumption. This is a sample app

The Phalcon PHP Framework 344 Dec 14, 2022