Symfony highlights

SYMFONY 2.8

Structure

Check doc, packagist.

  • Web

    • bundles (symlink)
      • Framework (CSS, JS, libraries)
        • SENSIO… (name can change)
  • Vendor (libs)

    • COMPOSER (similar to maven + stage)
    • DOCTRINE (similar to Hibernate)
    • IRCMAXWELL (passwords)
    • MONOLOG (logger_default)
    • PSR (logger format)
    • SENSIO (monolitic skeleton)
    • SWIFTMAILER (email)
    • SYMFONY
    • TWIG (templates to render JSF)
    • PHPUNIT (unit tests)
    • FORESTBUNDLE (generate REST app)
    • JMSSERIALIZER (serialize and deserialize)
    • JWTAUTHENTICATOR (Json web token, autenticator, session)
  • BIN (console for Symfony, internal, clean cache)

  • APP (internal config)

    • CACHE
    • LOG
    • RESOURCES (static at data level)
      • templates
      • translation
      • menu
    • CONFIG
      • security (firewall)
      • routing
      • routingdev (extends routing with profiles)
  • SRC (bundles)

    • APPBUNDLE (business modules, this is the main)

SYMFONY 3.4

Features

  • Microservice oriented.
    • Uses recipes, gets only the resources required.
  • Standard structure (UNIX).
  • Check xampp, composer, symfony for more info.

Changes

  • /var: cache log, session.
  • /web: no symlink, generated on compile.
  • /test: not on AppbBundle anymore.
  • /AppBundle/Datafeatures/: baseline for testing.
  • /AppBundle/Entity/: similar to Hibernate, classes that matches tables.
  • /AppBundle/EventListeners/: listens to events.
    • listeners: triggers.
    • subscribers: background task.

SYMFONY: CACHE

  • Console: fo to project folder.

    1
    2
    3
    cd app
    php console cache: clear
    php console cahe. clear --env=prod
  • You can check app /cache/dev/appDevDebugProjectContainerUrlGenerator.php

  • Tip: go to dev environment and review app_dev.pho/hello to be able to debug the URL.