Developed by Sensio Labs, major versions of Symfony are all supported for 3 years by the company. And even for life as far as security-related issues are concerned. For even greater stability, the minor versions of Symfony 2.0’s contract and interface are also guaranteed and compatibility between all minor versions will be ensured on the API defined by the public interfaces.
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* The Kernel is the heart of the Symfony system.
*
* It manages an environment made of bundles.
*
* @author Fabien Potencier
*
* @api
*/
interface KernelInterface extends HttpKernelInterface, \Serializable
{
/**
* Returns an array of bundles to registers.
*
* @return array An array of bundle instances.
*
* @api
*/
function registerBundles();
// **snip**
/**
* Gets the log directory.
*
* @return string The log directory
*
* @api
*/
function getLogDir();
}
Bug fix: [yes|no]
Feature addition: [yes|no]
Backwards compatibility break: [yes|no]
Symfony2 tests pass: [yes|no]
Fixes the following tickets: [comma separated list of tickets fixed by the PR]
The Components implement common features needed to develop websites. They are the foundation of the Symfony full-stack framework, but they can also be used standalone even if you don’t use the framework as they don’t have any mandatory dependencies.
(訳)Symfonyコンポーネントは、Webサイトを構築するための共通機能を実装しています。Symfonyフルスタックフレームワークの基盤として利用されていますが、必須の外部依存がないため、Symfonyフレームワークを使わない環境でも、スタンドアローンで利用できます。 The Components - Symfony
Symfonyフレームワークの根幹部分であるカーネルとバンドルシステムについて、以前の記事(Symfonyのカーネルの役割とバンドルシステム)で紹介しました。カーネルやバンドルシステムなどの背後に、再利用性の高いパッケージ群であるSymfonyコンポーネントがあります。次の図のように、カーネルやバンドルの内部で直接または間接的に、Symfonyコンポーネントの機能が利用されています。Kernel, Request, Response等のクラスの実装自体もSymfonyコンポーネント内にありますが、アプリケーション開発者が実際に実装を行うバンドルから見れば、Symfonyコンポーネントは単なるライブラリです。Symfony Standard EditionにはSymfonyコンポーネント以外のPHPライブラリもバンドルされていますが、それらとSymfonyコンポーネントは同列のものです。
<?php
// snip
namespace Symfony\Tests\Component\HttpKernel;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Config\Loader\LoaderInterface;
class KernelTest extends \PHPUnit_Framework_TestCase
{
// snip
public function testBootInitializesBundlesAndContainer()
{
$kernel = $this->getMockBuilder('Symfony\Tests\Component\HttpKernel\KernelForTest')
->disableOriginalConstructor()
->setMethods(array('initializeBundles', 'initializeContainer', 'getBundles'))
->getMock();
$kernel->expects($this->once())
->method('initializeBundles');
$kernel->expects($this->once())
->method('initializeContainer');
$kernel->expects($this->once())
->method('getBundles')
->will($this->returnValue(array()));
$kernel->boot();
}
...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
...
new PHPMentors\WorkflowerBundle\PHPMentorsWorkflowerBundle(),
);
...
...
use PHPMentors\DomainKata\Usecase\CommandUsecaseInterface;
use PHPMentors\Workflower\Process\Process;
use PHPMentors\Workflower\Process\ProcessAwareInterface;
use PHPMentors\Workflower\Process\WorkItemContextInterface;
use PHPMentors\Workflower\Workflow\Activity\ActivityInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
...
class LoanRequestProcessCompletionUsecase implements CommandUsecaseInterface, ProcessAwareInterface
{
...
/**
* @var Process
*/
private $process;
...
/**
* {@inheritdoc}
*/
public function setProcess(Process $process)
{
$this->process = $process;
}
...
/**
* {@inheritdoc}
*/
public function run(EntityInterface $entity)
{
assert($entity instanceof WorkItemContextInterface);
$this->process->completeWorkItem($entity);
...
ここまでの作業が終われば、Webインターフェイスやコマンドラインインターフェイス(Command Line Interface: CLI)からビジネスプロセスに対する一連の操作を実行できるようになります。
BPMSによるジェネレーティブプログラミングの実現に向けて
この記事では、Workflowerを使ったビジネスプロセスの管理をSymfonyアプリケーション上で行うために必要な作業について見てきました。WorkflowerおよびPHPMentorsWorkflowerBundleが提供するのはBPMN 2.0のワークフロー要素に対応するWorkflowドメインモデルと基本的なインテグレーションレイヤーに留まるため、実際にアプリケーションに組み込むためにはさらなる作業(とスキル)が要求されるでしょう。それは決して簡単なことではありません。なぜなら、それは対象ドメインに適したBPMS(Business Process Management System)あるいはBPMSフレームワークの設計に他ならないからです。
当時は C++ の他に、テレコム業界向け言語である CHILL や、軍需産業向け言語である Ada などの言語があり、それらの言語がオブジェクト指向なのかという議論がされていました。
最終的に C++ が残ることになりますが、C++ の作者である Stroustrup 氏は、そもそも C++ をオブジェクト指向言語ではなく、マルチパラダイム言語と定義していたことに注意する必要があります。
当時考えられていたオブジェクト指向の構成要素は次の3項目でした。
inheritance / 継承
polymorphism / ポリモーフィズム
instantiation / インスタンス化
1994年に Coplien さんは David Weiss 氏と Robert Chi Tao Lai 氏とともに仕事をしますが、その時、共通性/可変性分析を通じて、ソフトウェアファミリの振る舞いなどを特徴づけ、当時取り組んでいたソフトウェアのための DSL(Domain Specific Language) を開発しました。開発言語は C でした。