Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    rafstercoder
    @rafstercoder
    I think could be more details about how to run the examples
    Michael Mayer
    @lastzero
    Hi there!
    What do you mean by run? We have step-by-step instructions for every type of app: https://docs.symlex.org/en/latest/framework/
    Shall we make it more explicit that these are commands you need to run in a terminal and how to open a terminal?
    Or how to set up a runtime environment without Docker?
    Michael Mayer
    @lastzero
    @rafstercoder Or do you expect a list of more example commands and URLs?
    rafstercoder
    @rafstercoder
    @lastzero sorry for didn't give much info. Yeah, I tried to follow docs. I fixed the problems by:
    • making a copy or rename parameters.dist.yml to parameters.yml in app/config/
    • changing permissions on storage folder running chmod -R 777 storage
    Michael Mayer
    @lastzero
    parameters.yml should be automatically created when you run composer install or update (or create-project)
    Did you do that?
    Permissions should be mentioned in the docs, that's a good point (although obvious that you need write permissions for a file-based cache)
    Michael Mayer
    @lastzero
    @rafstercoder It seems composer.json has the same config for parameters.(dist.)yml for the other examples projects as well.
    I'll quickly add some infos regarding permissions to the docs!
    rafstercoder
    @rafstercoder

    I'm using the docker containerized composer provided by this bash function

    composer () {
        tty=
        tty -s && tty=--tty
        docker run \
            $tty \
            --interactive \
            --rm \
            --user $(id -u):$(id -g) \
            --volume /etc/passwd:/etc/passwd:ro \
            --volume /etc/group:/etc/group:ro \
            --volume $(pwd):/app \
            composer "$@"

    parameters.yml was not automatically created any time I tried.

    Yeah, I see that the permissions problems should be obvious but I'm not too familiarized with web development and I normally don't use stuff that require 777 permisions.

    Since the docs just tell to type some commands and check the localhost endpoint, I thought it would really be that straightforwad (like base symfony projects) does.

    @lastzero thanks for helping!
    rafstercoder
    @rafstercoder
    @lastzero Sorry! Yeah... I really was missing composer install. =/
    Michael Mayer
    @lastzero
    Oh, interesting. Haven't seen a containerized composer before!
    Can composer access the app directory with the config like that?
    Shouldn't require 777, but directories need to have the same owner as the web server obviously. Maybe the docker config can be optimized for that (like adding some entrypoint magic). Would be amazing to get a pull request for that.
    Michael Mayer
    @lastzero
    @rafstercoder Do base Symfony projects come with a docker-compose.yml? I think that's the issue. It's not that the framework needs 777 and in fact it is 98% Symfony. But if you run Docker with a different user than the directory you have mounted, it won't be able to create files.
    Good like that?
    Michael Mayer
    @lastzero
    Also updated README.md for symlex/symlex
    Michael Mayer
    @lastzero
    @rafstercoder Note that git doesn't allow to create files with 666 or 777, only 644 or 755 (just tried to be sure and it's good like that). So if Docker uses a different user than your own (maybe root works as well), you need to manually change permissions or change the Docker / docker-compose config accordingly. If somebody knows how to fix that with some Docker magic, a pull request would be amazing. Seems possible.
    Michael Mayer
    @lastzero
    rafstercoder
    @rafstercoder
    @lastzero One more inattention by my part using the above 'composer docker function' =/
    Since the image lacks PHP extensions, the --ignore-platform-reqsflag is required. The thing is I just copied the command with another flag --no-scripts. So, thats why composer was not asking me for parameters and then was not generating parameters.yml.
    Now I think its really good! I tested it again and works fine
    Michael Mayer
    @lastzero
    Great :)
    Should be add --ignore-platform-reqs to Step 1 in the docs?
    I think it might make the installation look really complicated if the the command gets very long
    rafstercoder
    @rafstercoder
    Yeah... Thats the case for the 'docker composer' ... I really don't know if people use it a lot.
    Michael Mayer
    @lastzero
    @rafstercoder You mean docker-compose is too complicated? Thought this is standard today and much easier than telling developers how to properly configure PHP, nginx and MySQL so that everything works together.
    Michael Mayer
    @lastzero
    I've just added more info how to set up a runtime environment without Docker.
    rafstercoder
    @rafstercoder
    @lastzero no no... maybe you missed the "R" in 'docker composer' ... I was referring to the bash function to use composer in docker (which require that flag)
    docker-compose is great!
    Michael Mayer
    @lastzero
    Ok, perfect :)
    Hope you'll find my/our work useful!
    rafstercoder
    @rafstercoder
    Just one more info about the permissions on folders. It seems that symfony 3.x had permissions problems with /var folder. It was changed in version 4 using umask. When creating a project, /var folder is set automatically to 0777, but I'm not sure how it's done.
    Michael Mayer
    @lastzero
    Interesting! Maybe you can add that as comment to the issue I created on GitHub yesterday?
    We're not checking permissions or existance of the cache folder to improve performance. But it could be done when composer runs.
    Michael Mayer
    @lastzero
    Released new versions of Symlex and Symlex Core today... Symlex Core is upgraded to PHPUnit 8.0 while Symlex itself has to stay with 7.x as Codeception does not support 8.x yet... lots of API changes. Functionality didn't change, just a small issue in the REST router fixed: HEAD is automatically redirected to cgetAction() if cheadAction() does not exist (previously redirected to getAction(), which was a bug).
    Also thanks to @tuzimoe our Chinese docs are online: https://docs.symlex.org/zh/latest/ :rocket:
    If you like Symlex, please spread the word / share the link... this is just a side project for me, not a business. So I need your help to promote it. In return, I keep it updated and give it away for free in the hope that developers find it useful :)
    phpbenchmarks
    @phpbenchmarks
    hi :)
    Michael Mayer
    @lastzero
    Moin Moin 🚀
    Michael Mayer
    @lastzero
    I've just published Symlex 4.3.0. It includes RoadRunner, a high-performance PHP application server written in Go.
    Difficult to find a faster combination of framework and server for building PHP apps ⚡️
    UI colors and look were also improved... see https://demo.symlex.org/
    Demo is already based on RoadRunner and at least 50% faster.
    Note that we use a small & cheap DigitalOcean server for the demo, big servers should deliver even better performance.
    Also I've created a Twitter account for project updates: https://twitter.com/symlexphp