nanoninja / docker-nginx-php-mysql

Docker running Nginx, PHP-FPM, MySQL & PHPMyAdmin
1.76k stars 867 forks source link

Add Laravel Support #27

Closed Rihoj closed 2 years ago

Rihoj commented 6 years ago

It took me 4+ hours to get this up and running, and to get laravel to work on my system, granted I was not framiliar with nginx and I had other issues with a deprecated package in source code. However, I found that maybe adding some parameters from the ENV file would help allow more customization and easier deployments for people who are new to this.

Rihoj commented 6 years ago

I am not sure how I am supposed to fix the Travis CI build.

getShortName from ReflectionFunctionAbstract.php is failing on line 152. It expects to return a string and it is returning an object.

return $this->node->name;

That is returning:

PhpParser\Node\Identifier Object
(
    [name] => getName
    [attributes:protected] => Array
        (
            [startLine] => 7
            [endLine] => 7
        )

)

and the $this->node is as follows:

PhpParser\Node\Stmt\ClassMethod Object
(
    [flags] => 1
    [byRef] => 
    [name] => PhpParser\Node\Identifier Object
        (
            [name] => getName
            [attributes:protected] => Array
                (
                    [startLine] => 7
                    [endLine] => 7
                )

        )

    [params] => Array
        (
        )

    [returnType] => 
    [stmts] => Array
        (
            [0] => PhpParser\Node\Stmt\Return_ Object
                (
                    [expr] => PhpParser\Node\Scalar\String_ Object
                        (
                            [value] => Nginx PHP MySQL
                            [attributes:protected] => Array
                                (
                                    [startLine] => 9
                                    [endLine] => 9
                                    [kind] => 1
                                )

                        )

                    [attributes:protected] => Array
                        (
                            [startLine] => 9
                            [endLine] => 9
                        )

                )

        )

    [attributes:protected] => Array
        (
            [startLine] => 7
            [endLine] => 10
        )

)

This seems like it has nothing to do with what my changes are, however if there is something I can do to fix this please let me know.

nanoninja commented 6 years ago

Hi @Rihoj,

Thanks for your contribution, I'll check your pull request.

Rihoj commented 5 years ago

@nanoninja, are you still looking into this?

nanoninja commented 3 years ago

@Rihoj sorry for my late response. I haven't had a lot of time to work on this project.

The problem with the support of Laravel is not Laravel but that it would be necessary to make a system of templates to adapt it to the different frameworks.

It would be interesting to make a version 2 and make the configuration simple and flexible. A bit like a MAMP but Docker style. We can already improve it as it is, but at the moment I don't have too much time. It would take contributors like you to add value.

I will try to take the time to improve this application. For the pull request that you made the tests did not pass, you have to look at why.

Rihoj commented 2 years ago

Closing due to inactivity.