survos/pico-bundle

pico-bundle Bundle

Maintainers

👁 tacman1123

Package info

github.com/survos/pico-bundle

Type:symfony-bundle

pkg:composer/survos/pico-bundle

Fund package maintenance!

kbond

Statistics

Installs: 29

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.10.19 2026-06-09 21:17 UTC

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 7193c6754724c80b8c0540a26e32af37144cb73f

symfonysymfony-ux

This package is auto-updated.

Last update: 2026-06-22 19:41:27 UTC


README

Symfony Bundle that provides some tools and a base layout for picocss

composer req survos/pico-bundle
symfony new pico-demo --webapp --version=next && cd pico-demo
echo "DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db" > .env.local

# this is just Symfony
composer config extra.symfony.allow-contrib true
composer require symfonycasts/verify-email-bundle
sed -i "s|# MAILER_DSN|MAILER_DSN|" .env
bin/console make:user --is-entity --identity-property-name=email --with-password User -n
echo ",,," | sed "s/,/\n/g" | bin/console make:security:form-login

bin/console make:controller AppController
sed -i "s|/app|/|" src/Controller/AppController.php 

echo ",,no,admin@test.com,AuthDemoBot,yes,app_homepage,no" | sed "s/,/\n/g" | bin/console make:registration-form
bin/console doctrine:schema:update --force
symfony server:start -d


echo "import '@picocss/pico';\n" >> assets/app.js
echo "import '@picocss/pico/css/pico.min.css';\n" >> assets/app.js


cat > templates/app/index.html.twig <<END
{% extends 'base.html.twig' %}
{% block body %}
 <div>
 <a href="{{ path('app_app') }}">Home</a>
 </div>

 {% if is_granted('IS_AUTHENTICATED_FULLY') %}
 <a class="btn btn-primary" href="{{ path('app_logout') }}">Logout {{ app.user.email }} </a>
 {% else %}
 <a class="btn btn-primary" href="{{ path('app_register') }}">Register</a>
 <a class="btn btn-secondary" href="{{ path('app_login') }}">Login</a>
 {% endif %}
{% endblock %}
END
symfony open:local

# add survos/auth-bundle to create users from the CLI
composer config allow-plugins.endroid/installer true
composer req survos/auth-bundle
bin/console survos:user:create admin@test.com password --roles ROLE_ADMIN
bin/console survos:user:create bob@test.com password
bin/console survos:user:create carol@test.com password
symfony server:start -d
symfony open:local --path=/login

Deprecated

sed -i "s|some_route|app_app|" src/Security/AppAuthenticator.php
sed -i "s|// return new|return new|" src/Security/AppAuthenticator.php
sed -i "s|throw new|//throw new|" src/Security/AppAuthenticator.php