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
PHP Framework for building scalable API's on top of Laravel.

Apiato Build scalable API's faster | With PHP 7.2.5 and Laravel 7.0 Apiato is a framework for building scalable and testable API-Centric Applications

Apiato 2.8k Dec 29, 2022
PHP Framework for building scalable API's on top of Laravel.

Apiato Build scalable API's faster | With PHP 7.2.5 and Laravel 7.0 Apiato is a framework for building scalable and testable API-Centric Applications

Apiato 2.8k Dec 31, 2022
LaraLTE2, Laravel PHP Framework with AdminLTE2

LaraLTE2 Laravel PHP Framework with AdminLTE2 Whenever I start a new Laravel project, I do the same thing; Install packages, download Javascript plugi

Kouceyla 25 Nov 18, 2020
Dynamic Framework :: A PHP starter kit for Noobs

A PHP starter kit for Noobs Author : Abdulbasit Rubeiyya The dynamic framework is not exactly a framework, but more of a starter kit for you, the thin

Abdulbasit Rubeiyya 1 Dec 16, 2022
Simple skeleton for the PHP Slim framework

Simple skeleton for the PHP Slim framework

Andrew S Erwin 2 Nov 13, 2021
Exemplary RealWorld backend API built with Laravel PHP framework.

Example of a PHP-based Laravel application containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld API spec.

Yury 66 Dec 31, 2022
A Web Artisan list of categorized OPEN SOURCE PROJECTS built with Laravel PHP Framework.

Laravel-Open-Source-Projects A Web Artisan list of categorized OPEN SOURCE PROJECTS built with Laravel PHP Framework. This repository includes a compr

Goodness Toluwanimi Kayode 833 Dec 26, 2022
Here you have yet another framework for writing RESTful web services in PHP

PHP-Rocker Here you have yet another framework for writing RESTful web services in PHP, jay! What sets this framework apart from many of the others is

Victor Jonsson 43 May 19, 2022
Lumen PHP Framework (Starter Template)

This repository contains JWT Auth, Form Request, Route List, Redis, RabbitMQ and Mail packages. A ready auth system comes with the project

Yasin Köse 1 Feb 11, 2022
Very simple CRUD project, written in pure php. Designed as framework-agnostic as possible, and with basically no stack overflow if you can believe that

briefly simple CRUD pure php project for self improvement I try to make it purely in github - not only code, but any documentation (wiki), tasks (issu

Michał Jędrasiak 1 Jan 23, 2022
Rest API boilerplate for Lumen micro-framework.

REST API with Lumen 5.5 A RESTful API boilerplate for Lumen micro-framework. Features included: Users Resource OAuth2 Authentication using Laravel Pas

Hasan Hasibul 484 Sep 16, 2022
A lightweight full-stack component layer that doesn't dictate your front-end framework

Airwire A lightweight full-stack component layer that doesn't dictate your front-end framework Demo Introduction Airwire is a thin layer between your

ARCHTECH 199 Nov 23, 2022
An account management Panel based on Laravel7 framework. Include multiple payment, account management, system caching, admin notification, products models, and more.

ProxyPanel 简体中文 Support but not limited to: Shadowsocks,ShadowsocksR,ShadowsocksRR,V2Ray,Trojan,VNET Demo Demo will always on dev/latest code, rather

null 17 Sep 3, 2022
Slim Framework 4 Skeleton Application

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Cleonildo Soares Guimaraes Junior 5 Nov 21, 2021
Base Laravel framework with a simple admin site/dashboard

Base Laravel Admin Just a basic Laravel 4.1 install with a admin site/dashboard using Bootstrap 3.0.3 For those (like me) who set up lots of small sys

Alex Dover 1 Nov 6, 2015
Berikut Adalah cara untuk melakukan CRUD di FrameWork Laravel, Silahkan Disimak

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

LilKhoo 1 Oct 23, 2021
fast Framework of Hyperf(一把梭快速骨架 CRUD快速开发)

fast-framework Hyperf 的一把梭骨架 composer require yogcloud/framework 功能 提供从 Controller Request Model Service Interface 一整套生成命令 $ php bin/hyperf gen g

null 17 Aug 9, 2022
A simple starter kit for using TypedCMS with the Laravel framework.

TypedCMS Starter Kit for Laravel Our stater kits are tailored solutions for each platform, unlike the simple API wrappers offered by other vendors. Th

TypedCMS 1 Nov 20, 2021
Laravel Framework 5 Bootstrap 3 Starter Site is a basic application with news, photo and video galeries.

Laravel Framework 5.1 Bootstrap 3 Starter Site Starter Site based on on Laravel 5.1 and Boostrap 3 Features Requirements How to install Application St

null 900 Dec 22, 2022