- IDE
- The list of development comments
- @cons: consider
- @tech: technical
- @todo: improve
- @note: information
- @important: note/remember/consider/etc. the important part of the code
- @req[XX]: request the information from a colleague "XName XSurname"
- The list of development comments
- Tune the JetBrains IDE:
version: "3" | |
services: | |
nginx-docs: | |
container_name: "docs.nginx" | |
ports: | |
- "7837:80" | |
version: "3" | |
services: | |
nginx-docs: | |
image: "nginx" | |
container_name: "nginx" | |
volumes: | |
- ./.docs/html:/usr/share/nginx/html:ro | |
ports: | |
- "80:80" | |
environment: |
Версионирование — разработка и управление несколькими выпусками продукта, которые имеют тот же общий функционал, но усовершенствованы, модернизированы либо индивидуализированы. Коротко, версия говорит об изменении продукта. Как версия говорит об изменении продукта? Давайте назовем систему упорядочивания символов для обозначения версии продукта — схемой версионирования. Различные схемы версионирования были созданы для отслеживания версий различного программного обеспечения.
Схем версионирования много, но мы сталкиваемся с Семантическим версионированием (Semantic Versioning) каждый день. Для Семантического версионирования характерно то, что номера версий и то, как они меняются, передают смысл содержания исходного кода и какие модификации были применены от одной версии к другой. Рассмотрим, каким образом формируется номер Семантической версии.
<?php | |
namespace ApiBundle\Features\Context; | |
use Behat\Behat\Context\Context; | |
use Behat\Behat\Context\SnippetAcceptingContext; | |
use Behat\Gherkin\Node\PyStringNode; | |
use Behat\Gherkin\Node\TableNode; | |
use Guzzle\Http\Client; | |
use Guzzle\Http\Exception\BadResponseException; |
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle
The API we are creating in this gist will follow these rules :
- The API only returns JSON responses
- All API routes require authentication
- Authentication is handled via OAuth2 with
password
Grant Type only (no need for Authorization pages and such). - API versioning is managed via a subdomain (e.g.
v1.api.example.com
)
The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
<?php | |
/** | |
* This recurcive function build full path for nested set node by classic array | |
* | |
* @param $tree | |
* @param $needle | |
* @param array $path | |
* @return array|bool | |
*/ |
import this; |