Skip to content
  • About
    • What is Symfony?
    • Community
    • News
    • Contributing
    • Support
  • Documentation
    • Symfony Docs
    • Symfony Book
    • Screencasts
    • Symfony Bundles
    • Symfony Cloud
    • Training
  • Services
    • Platform.sh for Symfony Best platform to deploy Symfony apps
    • SymfonyInsight Automatic quality checks for your apps
    • Symfony Certification Prove your knowledge and boost your career
    • SensioLabs Professional services to help you with Symfony
    • Blackfire Profile and monitor performance of your apps
  • Other
  • Blog
  • Download
sponsored by
  1. Home
  2. Documentation
  3. Symfony: The Fast Track
  4. Russian
  5. Выбор методологии разработки

Выбор методологии разработки

Учить — значит повторять что-то одно и то же снова и снова. Я не буду применять такой подход, обещаю. В конце каждого шага исполните победный танец и сохраните результат проделанной работы. Это подобно нажатию Ctrl+S, только для всего сайта целиком.

Стратегия использования Git

В конце каждого шага не забудьте зафиксировать изменения в git:

1
2
$ git add .
$ git commit -m'Add some new feature'

Вы можете смело добавлять в коммит все файлы, потому что при создании Symfony-проекта уже был подготовлен файл .gitignore. Кроме того, каждый пакет может добавлять свои собственные шаблоны игнорируемых файлов в .gitignore. Взгляните на текущее содержимое:

.gitignore
1
2
3
4
5
6
7
8
9
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

Эти странные строки — маркеры, добавленные Symfony Flex, чтобы определить, что нужно удалить, если вы решите удалить зависимость. Как я упоминал ранее, вся эта утомительная работа выполняется автоматически Symfony.

Теперь самое время разместить репозиторий на удалённый сервер. Для этого прекрасно подойдёт GitHub, GitLab или Bitbucket.

Note

Если вы развёртываете проект на Platform.sh, у вас уже есть копия Git-репозитория, поскольку при развёртывании через cloud:deploy Platform.sh использует Git. Но вам не стоит полагаться на Git-репозиторий, используемый Platform.sh. Он не является резервной копией и предназначен только для развёртывания.

Развёртывание в продакшене с помощью непрерывной интеграции

Ещё одной хорошей практикой является частое развёртывание. Развёртывание в конце каждого шага — хорошо и полезно:

1
$ symfony cloud:deploy
Previous page С нуля до развёртывания
Next page Поиск и устранение неисправностей
This work, including the code samples, is licensed under a Creative Commons BY-NC-SA 4.0 license.
TOC
    Version

    Symfony 6.4 is backed by

    Symfony Code Performance Profiling

    Symfony Code Performance Profiling

    Become certified from home

    Become certified from home

    Version:
    Locale:
    ebook

    This book is backed by:

    see all backers

    Symfony footer

    Avatar of Simon Sargeant, a Symfony contributor

    Thanks Simon Sargeant for being a Symfony contributor

    1 commit • 8 lines changed

    View all contributors that help us make Symfony

    Become a Symfony contributor

    Be an active part of the community and contribute ideas, code and bug fixes. Both experts and newcomers are welcome.

    Learn how to contribute

    Symfony™ is a trademark of Symfony SAS. All rights reserved.

    • What is Symfony?

      • What is Symfony?
      • Symfony at a Glance
      • Symfony Components
      • Symfony Releases
      • Security Policy
      • Logo & Screenshots
      • Trademark & Licenses
      • symfony1 Legacy
    • Learn Symfony

      • Symfony Docs
      • Symfony Book
      • Reference
      • Bundles
      • Best Practices
      • Training
      • eLearning Platform
      • Certification
    • Screencasts

      • Learn Symfony
      • Learn PHP
      • Learn JavaScript
      • Learn Drupal
      • Learn RESTful APIs
    • Community

      • Symfony Community
      • SymfonyConnect
      • Events & Meetups
      • Projects using Symfony
      • Contributors
      • Symfony Jobs
      • Backers
      • Code of Conduct
      • Downloads Stats
      • Support
    • Blog

      • All Blog Posts
      • A Week of Symfony
      • Case Studies
      • Cloud
      • Community
      • Conferences
      • Diversity
      • Living on the edge
      • Releases
      • Security Advisories
      • Symfony Insight
      • Twig
      • SensioLabs Blog
    • Services

      • SensioLabs services
      • Train developers
      • Manage your project quality
      • Improve your project performance
      • Host Symfony projects

      Powered by

    Follow Symfony