• Overview
    Key features
    • Observability
    • Auto-scaling
    • Multiframework
    • Security
    Frameworks
    • Django
    • Next.js
    • Drupal
    • WordPress
    • Symfony
    • Magento
    • See all frameworks
    Languages
    • PHP
    • Python
    • Node.js
    • Ruby
    • Java
    • Go
  • Industries
    • Consumer Goods
    • Media/Entertainment
    • Higher Education
    • Government
    • Ecommerce
  • Pricing
  • Featured articles
    • Switching to Platform.sh can help IT/DevOps organizations drive 219% ROI
    • Organizations, the ultimate way to manage your users and projects
  • Support
  • Docs
  • Login
  • Request a demo
  • Free Trial
Meet Upsun. The new, self-service, fully managed PaaS, powered by Platform.sh.Try it now
Blog

Platform.sh hosts Symfony documentation GitHub pull requests

symfonydrupalphp
10 September, 2015
Symfony
Symfony

Note: This article has been published on Symfony official blog. Read the source.

Symfony’s documentation is an open source project with more than 800 contributors. That’s great! But our goal is to always make it easier to contribute and faster to merge in changes. And today, we’ve started doing something really cool to improve our workflow: integration with Platform.sh.

Platform.sh is a hosting solution that provides out-of-the-box continuous deployment for Symfony, Drupal and any other PHP applications. It extends the concept of a Git branch at the infrastructure level. Basically, this means that it’s easy to deploy every branch and/or Pull Request to its own URL.

Symfony’s documentation is written in Sphinx (Markdown on steroids) with linking, complex code blocks and more. That gives us a lot of flexibility, but also causes 2 major problems:

  • When someone makes a pull request to the docs, they can’t immediately see how it will render.
  • It’s tough to review, since it takes too much time for a reviewer to pull down the branch, compile it locally, then open it up in a browser.

The problem is shared with any real coding projects: when you finish a feature, you then need to manually deploy it to a server before it can be reviewed and tested.

But what if each pull request could be automatically deployed to its own server with its own URL?

This is something we’ve wanted for a long time… That’s why we were thrilled when Platform.sh approached us and said “Yeah, that’s easy to do!”.

So, as of today, I’m excited to say that the Symfony documentation is the first open source project (we know of at least) that automatically builds and deploys any code change from any contributor into an isolated environment with its own URL, so it can easily be reviewed and tested. Boom!

For example, Pull Request #5530 documents an entire new feature. By simply clicking “Details” next to the “platformsh” check on the bottom, we can review this pull request in its true HTML format.

You see that there is a URL provided by Platform.sh and including the http://pr-5530-6qmocelev2lwe.eu.platform.sh/

How is the madness possible?

First, Platform.sh was awesome enough to setup our environment for #! If you see them on Twitter or at a conference, give them a big thank you!

Second, the only thing required to integrate with Platform.sh is to add a configuration file called  .platform.app.yaml  in your repository which describes how the code should be built - similar to  .travis.yml . That - and a GitHub webhook - were enough to start automatically deploying pull requests.

Third, WouterJ (core docs contributor) created a symfony.com-like theme to make the previews as realistic as possible.

So, next time you make a pull request to the docs, check out how it looks!

Get the latest Platform.sh news and resources
Subscribe

Related Content

Running with FrankenPHP on Platform.sh

Running with FrankenPHP on Platform.sh

Company
AboutSecurity and complianceTrust CenterCareersPressContact us
Thank you for subscribing!
  •  
Field required
Leader Winter 2023
System StatusPrivacyTerms of ServiceImpressumWCAG ComplianceAcceptable Use PolicyManage your cookie preferencesReport a security issue
© 2024 Platform.sh. All rights reserved.
Supported by Horizon 2020's SME Instrument - European Commission 🇪🇺