<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Symfony-IT</title>
	
	<link>http://www.symfony.it</link>
	<description>Just another Symfony weblog</description>
	<lastBuildDate>Thu, 16 May 2013 06:44:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<div id="fb-root" />
					<script type="text/javascript">
						window.fbAsyncInit = function()
						{
							FB.init({appId: null, status: true, cookie: true, xfbml: true});
						};
						(function()
						{
							var e = document.createElement('script'); e.async = true;
							e.src = document.location.protocol + '//connect.facebook.net/it_IT/all.js';
							document.getElementById('fb-root').appendChild(e);
						}());
					</script>	
						<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Symfony-it" /><feedburner:info uri="symfony-it" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Symfony-it</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>phpDay 2013</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/U1zSeG_3jcQ/</link>
		<comments>http://www.symfony.it/articoli/738/phpday-2013/#comments</comments>
		<pubDate>Thu, 16 May 2013 06:44:33 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[eventi]]></category>
		<category><![CDATA[phpday]]></category>
		<category><![CDATA[phpday2013]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=738</guid>
		<description><![CDATA[Anche quest&#8217;anno si svolgerà a Verona il phpDay, evento nazionale di riferimento per PHP, ormai elevato a rango internazionale. Come sempre, Symfony avrà una (meritata) importante presenza alla conferenza. Ecco tutti i talk in programma a riguardo: Puppeteering your symfony2 &#8230; <a href="http://www.symfony.it/articoli/738/phpday-2013/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://2013.phpday.it"><img class="alignleft" alt="" src="http://2013.phpday.it/wp-content/themes/phpday/img/logo_phpday.png" width="205" height="87" /></a>Anche quest&#8217;anno si svolgerà a Verona il <a href="http://2013.phpday.it/">phpDay</a>, evento nazionale di riferimento per PHP, ormai elevato a rango internazionale.<br />
Come sempre, Symfony avrà una (meritata) importante presenza alla conferenza. Ecco tutti i talk in programma a riguardo:</p>
<ul>
<li><a title="Puppeteering your symfony2 project" href="http://2013.phpday.it/talk/puppeteering-your-symfony2-project/">Puppeteering your symfony2 project</a></li>
<li>
<h4><a title="REST APIs made easy with Symfony2" href="http://2013.phpday.it/talk/rest-apis-made-easy-with-symfony2/">REST APIs made easy with Symfony2</a></h4>
</li>
<li>
<h4><a title="Caching and data analysis will move your Symfony2 application to the next level." href="http://2013.phpday.it/talk/caching-and-data-analisys-will-move-your-symfony2-application-to-the-next-level/">Caching and data analysis will move your Symfony2 application to the next level.</a></h4>
</li>
<li>
<h4><a title="Real-time sports statistics with Node.js, web sockets and Symfony2" href="http://2013.phpday.it/talk/real-time-sports-statistics-with-node-js-web-sockets-and-symfony2/">Real-time sports statistics with Node.js, web sockets and Symfony2</a></h4>
</li>
<li>
<h4><a title="Zend Framework 2 for a Symfony2 user" href="http://2013.phpday.it/talk/zend-framework-2-for-a-symfony2-user/">Zend Framework 2 for a Symfony2 user</a></h4>
</li>
<li>
<h4><a title="Symfony and eZ Publish" href="http://2013.phpday.it/talk/symfony-and-ez-publish/">Symfony and eZ Publish</a></h4>
</li>
<li>
<h4><a title="Zend Framework 2 and Symfony2: The perfect team" href="http://2013.phpday.it/talk/zend-framework-2-and-symfony2-the-perfect-team/">Zend Framework 2 and Symfony2: The perfect team</a></h4>
</li>
</ul>
<p>Per il programma completo, rimandiamo al sito ufficiale: <a href="http://2013.phpday.it/schedule/">http://2013.phpday.it/schedule/</a></p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/738/phpday-2013/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=U1zSeG_3jcQ:sfeMz5UpRU0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=U1zSeG_3jcQ:sfeMz5UpRU0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=U1zSeG_3jcQ:sfeMz5UpRU0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=U1zSeG_3jcQ:sfeMz5UpRU0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=U1zSeG_3jcQ:sfeMz5UpRU0:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/738/phpday-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/738/phpday-2013/</feedburner:origLink></item>
		<item>
		<title>Versioni di Capifony</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/dRdIn4O0Iy0/</link>
		<comments>http://www.symfony.it/articoli/722/versioni-di-capifony/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 09:17:41 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[symfony]]></category>
		<category><![CDATA[capifony]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[deploy]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=722</guid>
		<description><![CDATA[Capifony, come sapete, è ormai lo standard de facto per il deploy con Symfony. È un bel progetto, mantenuto attivamente, che quindi spesso viene aggiornato. Dal canto suo, anche Capistrano (a cui Capifony si appoggia), riceve vari aggiornamenti. E qui &#8230; <a href="http://www.symfony.it/articoli/722/versioni-di-capifony/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Capifony, come sapete, è ormai lo standard <em>de facto</em> per il deploy con Symfony. È un bel progetto, mantenuto attivamente, che quindi spesso viene aggiornato. Dal canto suo, anche Capistrano (a cui Capifony si appoggia), riceve vari aggiornamenti. E qui purtroppo arrivano i problemi: più di una volta mi è capitato di trovarmi con un Capifony non funzionante, a causa di stretti requisiti (un po&#8217; troppo stretti, a mio parere) sulle dipendenze.<br />
Prendiamo come esempio le ultime versioni al momento disponibili: aggiornando oggi le gemme di ruby, ho avuto questa brutta sorpresa:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>site_ruby<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>rubygems<span style="color: #000000; font-weight: bold;">/</span>dependency.rb:<span style="color: #000000;">247</span>:in <span style="color: #000000; font-weight: bold;">`</span>to_specs<span style="color: #ff0000;">': Could not find capistrano (&lt;= 2.14.1, &gt;= 2.13.5) amongst [capifony-2.2.7, capistrano-2.14.2, capistrano-maintenance-0.0.2, colored-1.2, highline-1.6.15, inifile-2.0.2, net-scp-1.1.0, net-sftp-2.1.1, net-ssh-2.6.5, net-ssh-gateway-1.2.0] (Gem::LoadError)</span></pre></td></tr></table></div>

<p>La versione più recente di Capifony richiede Capistrano non più nuovo di 2.14.1, ma il Capistrano più recente è 2.14.2.<br />
Ecco come ho risolto (i comandi sono stati dati su Ubuntu Linux 12.10, <em>your mileage may vary</em>)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem uninstall capistrano <span style="color: #660033;">-v</span> 2.14.2
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> capistrano <span style="color: #660033;">-v</span> 2.14.1</pre></td></tr></table></div>

<p>L&#8217;ultimo comando serve solo se in precedenza è stata fatta una pulizia delle gemme, tramite <code>sudo gem clean</code>. Purtroppo anche questa va fatta, perché spesso le versioni diverse sono in conflitto tra di loro.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/722/versioni-di-capifony/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=dRdIn4O0Iy0:qD_dXrn3sqk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=dRdIn4O0Iy0:qD_dXrn3sqk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=dRdIn4O0Iy0:qD_dXrn3sqk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=dRdIn4O0Iy0:qD_dXrn3sqk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=dRdIn4O0Iy0:qD_dXrn3sqk:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/722/versioni-di-capifony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/722/versioni-di-capifony/</feedburner:origLink></item>
		<item>
		<title>Fixture con contenitore di servizi nei test funzionali</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/OV6BgCKALLA/</link>
		<comments>http://www.symfony.it/articoli/714/fixture-con-contenitore-di-servizi-nei-test-funzionali/#comments</comments>
		<pubDate>Wed, 30 Jan 2013 14:36:16 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[symfony2]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[varie]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=714</guid>
		<description><![CDATA[A volte può essere utile avere a disposizione il contenitore di servizi nelle fixture usate nei test funzionali. Un caso tipico è l&#8217;uso di FOSUserBundle, che mette a disposizione un servizio UserManager per creare utenti, utilizzabile quindi anche per crearli &#8230; <a href="http://www.symfony.it/articoli/714/fixture-con-contenitore-di-servizi-nei-test-funzionali/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A volte può essere utile avere a disposizione il contenitore di servizi nelle fixture usate nei test funzionali. Un caso tipico è l&#8217;uso di FOSUserBundle, che mette a disposizione un servizio UserManager per creare utenti, utilizzabile quindi anche per crearli all&#8217;interno delle fixture.<br />
Purtroppo la documentazione a riguardo è alquanto avara di informazioni, per cui condivido qui questa soluzione, mostrando un esempio.<br />
Ecco un possibile file di fixture per gli utenti:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">namespace</span> Acme\PippoBundle\DataFixtures\ORM<span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> Doctrine\Common\DataFixtures\AbstractFixture<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Doctrine\Common\DataFixtures\OrderedFixtureInterface<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Doctrine\Common\Persistence\ObjectManager<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Symfony\Component\DependencyInjection\ContainerAwareInterface<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Symfony\Component\DependencyInjection\ContainerInterface<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> LoadUserData <span style="color: #000000; font-weight: bold;">extends</span> AbstractFixture implements OrderedFixtureInterface<span style="color: #339933;">,</span> ContainerAwareInterface
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$container</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setContainer<span style="color: #009900;">&#40;</span>ContainerInterface <span style="color: #000088;">$container</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">container</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$container</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> load<span style="color: #009900;">&#40;</span>ObjectManager <span style="color: #000088;">$manager</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$userManager</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">container</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'fos_user.user_manager'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$user1</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$userManager</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">createUser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$user1</span>
            <span style="color: #339933;">-&gt;</span><span style="color: #004000;">setUsername</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pippo'</span><span style="color: #009900;">&#41;</span>
            <span style="color: #339933;">-&gt;</span><span style="color: #004000;">setEmail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pippo@example.org'</span><span style="color: #009900;">&#41;</span>
            <span style="color: #339933;">-&gt;</span><span style="color: #004000;">setFirstName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mallo'</span><span style="color: #009900;">&#41;</span>
            <span style="color: #339933;">-&gt;</span><span style="color: #004000;">setLastName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Di Noce'</span><span style="color: #009900;">&#41;</span>
            <span style="color: #339933;">-&gt;</span><span style="color: #004000;">setBirthday</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> \DateTime<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'1977-07-07'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #339933;">-&gt;</span><span style="color: #004000;">setEnabled</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span>
            <span style="color: #339933;">-&gt;</span><span style="color: #004000;">setPlainPassword</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mallodinoce'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">;</span>
        <span style="color: #000088;">$userManager</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">updateUser</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user1</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$manager</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">persist</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addReference</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'user1'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$manager</span><span style="color: #339933;">-&gt;</span><span style="color: #990000;">flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getOrder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Questa fixture si può usare in un test in questo modo:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">namespace</span> Acme\PippoBundle\Tests\Controller<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> Acme\PippoBundle\DataFixtures\ORM\LoadUserData<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Doctrine\Common\DataFixtures\Executor\ORMExecutor<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Doctrine\Common\DataFixtures\Purger\ORMPurger<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader <span style="color: #b1b100;">as</span> Loader<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// il trucco è qui..</span>
<span style="color: #000000; font-weight: bold;">use</span> Symfony\Bundle\FrameworkBundle\Test\WebTestCase
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> DefaultControllerTest <span style="color: #000000; font-weight: bold;">extends</span> WebTestCase
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setUp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$kernel</span> <span style="color: #339933;">=</span> static<span style="color: #339933;">::</span><span style="color: #004000;">createKernel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$kernel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">boot</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$container</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$kernel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getContainer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$loader</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #009900;">&#40;</span><span style="color: #000088;">$container</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// ... e qui</span>
        <span style="color: #000088;">$loader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addFixture</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LoadUserData<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$purger</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ORMPurger<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$executor</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ORMExecutor<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">em</span><span style="color: #339933;">,</span> <span style="color: #000088;">$purger</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$executor</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$loader</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFixtures</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> 
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> testIndex<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> static<span style="color: #339933;">::</span><span style="color: #004000;">createClient</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$crawler</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">request</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'GET'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assertTrue</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getResponse</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isSuccessful</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/714/fixture-con-contenitore-di-servizi-nei-test-funzionali/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=OV6BgCKALLA:a4rpBcsyM0w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=OV6BgCKALLA:a4rpBcsyM0w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=OV6BgCKALLA:a4rpBcsyM0w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=OV6BgCKALLA:a4rpBcsyM0w:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=OV6BgCKALLA:a4rpBcsyM0w:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/714/fixture-con-contenitore-di-servizi-nei-test-funzionali/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/714/fixture-con-contenitore-di-servizi-nei-test-funzionali/</feedburner:origLink></item>
		<item>
		<title>Rilasciato Symfony 2.2.0beta</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/dZNyD72Ty-U/</link>
		<comments>http://www.symfony.it/articoli/710/rilasciato-symfony-2-2-0beta/#comments</comments>
		<pubDate>Wed, 09 Jan 2013 17:53:07 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[aggiornamenti]]></category>
		<category><![CDATA[symfony2]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=710</guid>
		<description><![CDATA[Come ampiamente annunciato nella documentazione sul processo di rilascio, la prossima versione di Symfony 2.2 uscirà a fine febbraio prossimo. Oggi intanto ne è uscita la prima beta, mentre una release candidate è prevista per fine mese. Intanto già si &#8230; <a href="http://www.symfony.it/articoli/710/rilasciato-symfony-2-2-0beta/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Come ampiamente annunciato nella documentazione sul <a href="http://symfony.com/it/doc/current/contributing/community/releases.html#piano">processo di rilascio</a>, la prossima versione di Symfony 2.2 uscirà a fine febbraio prossimo. Oggi intanto ne è uscita la prima beta, mentre una <em>release candidate</em> è prevista per fine mese.<br />
Intanto già si parla di 2.3, la prima LTS! La sua uscita è prevista per fine maggio.<br />
Attenzione anche alla 2.0, perché a fine gennaio scadrà il suo supporto.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/710/rilasciato-symfony-2-2-0beta/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=dZNyD72Ty-U:nTiOh_TqHKg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=dZNyD72Ty-U:nTiOh_TqHKg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=dZNyD72Ty-U:nTiOh_TqHKg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=dZNyD72Ty-U:nTiOh_TqHKg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=dZNyD72Ty-U:nTiOh_TqHKg:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/710/rilasciato-symfony-2-2-0beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/710/rilasciato-symfony-2-2-0beta/</feedburner:origLink></item>
		<item>
		<title>SymfonyDay in Italia</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/H2WYgAuMA9I/</link>
		<comments>http://www.symfony.it/articoli/699/symfonyday-in-italia/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 17:29:05 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[eventi]]></category>
		<category><![CDATA[SymfonyDay]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=699</guid>
		<description><![CDATA[Tra un mese esatto, il 5 ottobre 2012, si terrà a Torino il primo evento italiano dedicato completamente a Symfony, il SymfonyDay. Purtroppo l&#8217;evento ha dei posti limitati, nel momento in cui scriviamo ne sono rimasti solamente 7 e probabilmente &#8230; <a href="http://www.symfony.it/articoli/699/symfonyday-in-italia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img class="alignleft" src="http://www.symfonyday.it/img/logo_symfony.png" alt="" width="118" height="117" /> Tra un mese esatto, il 5 ottobre 2012, si terrà a Torino il primo evento italiano dedicato completamente a Symfony, il <a href="http://www.symfonyday.it/">SymfonyDay</a>.<br />
Purtroppo l&#8217;evento ha dei posti limitati, nel momento in cui scriviamo ne sono rimasti solamente 7 e probabilmente finiranno in fretta.</p>
<p>Affrettatevi quindi, per non mancare a questo evento imperdibile.<br />
Sul sito del SymfonyDay sono già disponibili tutte le informazioni necessarie, compreso il <a href="http://www.symfonyday.it/#schedule">programma completo</a>.<br />
Ci vediamo a Torino!</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/699/symfonyday-in-italia/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=H2WYgAuMA9I:FbhnGfGpUXs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=H2WYgAuMA9I:FbhnGfGpUXs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=H2WYgAuMA9I:FbhnGfGpUXs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=H2WYgAuMA9I:FbhnGfGpUXs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=H2WYgAuMA9I:FbhnGfGpUXs:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/699/symfonyday-in-italia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/699/symfonyday-in-italia/</feedburner:origLink></item>
		<item>
		<title>Sonata e sortable</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/zpgMy8OTrns/</link>
		<comments>http://www.symfony.it/articoli/690/sonata-e-sortable/#comments</comments>
		<pubDate>Tue, 21 Aug 2012 08:21:17 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[Sonata]]></category>
		<category><![CDATA[sortable]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=690</guid>
		<description><![CDATA[Chi avesse l&#8217;esigenza di gestire in Sonata un&#8217;entità con applicato il behaviour sortable di Doctrine2 si troverebbe con la sgradita sorpresa di non poter operare le comuni operazioni necessarie in questi casi: tipicamente, spostare le righe in su, in giù &#8230; <a href="http://www.symfony.it/articoli/690/sonata-e-sortable/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Chi avesse l&#8217;esigenza di gestire in Sonata un&#8217;entità con applicato il behaviour sortable di Doctrine2 si troverebbe con la sgradita sorpresa di non poter operare le comuni operazioni necessarie in questi casi: tipicamente, spostare le righe in su, in giù o in cima alla lista.<br />
Purtroppo tale behaviour non offre alcun metodo che astragga le operazioni di cui sopra: l&#8217;unico modo per spostare un oggetto è quello di assegnargli una nuova posizione, dopo di che gli altri oggetti saranno riordinati di conseguenza.<br />
Vediamo dunque come ottenere il risultato desiderato in Sonata. Per farlo, supponiamo di avere un&#8217;entità chiamata Article. Supponiamo inoltre che la proprietà che indica la posizione in tale entità si chiami <code>$position</code>.<br />
Per prima cosa, dobbiamo creare un controllore che implementi le nostre nuove azioni di spostamento.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">namespace</span> Acme\MioBundle\Controller<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> Sonata\AdminBundle\Controller\CRUDController<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Symfony\Component\HttpFoundation\RedirectResponse<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> ArticleAdminController <span style="color: #000000; font-weight: bold;">extends</span> CRUDController
<span style="color: #009900;">&#123;</span>
    <span style="color: #009933; font-style: italic;">/**
     * Move element up
     *
     * @param integer $id
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> moveupAction<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$object</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getObject</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$object</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">update</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isXmlHttpRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">renderJson</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">'result'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ok'</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'objectId'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getNormalizedIdentifier</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'session'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setFlash</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sonata_flash_info'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Elemento spostato in su.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> RedirectResponse<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">generateUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'list'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFilterParameters</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Move element top
     *
     * @param integer $id
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> movetopAction<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$object</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getObject</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPosition</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$object</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setPosition</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">update</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isXmlHttpRequest</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">renderJson</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                <span style="color: #0000ff;">'result'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ok'</span><span style="color: #339933;">,</span>
                <span style="color: #0000ff;">'objectId'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getNormalizedIdentifier</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'session'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setFlash</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sonata_flash_info'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Elemento spostato in cima.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> RedirectResponse<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">generateUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'list'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">admin</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFilterParameters</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Le uniche parti da adattare in questo controllore sono il namespace e il nome della classe.<br />
Ora occorre dire a Sonata di usare questo controllore: possiamo farlo nel file di configurazione dei servizi (services.xml o services.yml), semplicemente sostituendo <code>SonataAdminBundle:CRUD</code> con <code>AcmeMioBundle:ArticleAdmin</code> nel terzo <em>argument</em>.<br />
L&#8217;ultima parte da modificare è la classe ArticleAdmin.<br />
Innanzitutto sarebbe logico che gli elementi siano ordinati in base alla posizione: aggiungiamo quindi la seguente proprietà:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000088;">$datagridValues</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'_page'</span>       <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'_sort_order'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'_sort_by'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'position'</span><span style="color: #339933;">,</span>
 <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Modifichiamo quindi il metodo <code>configureListFields()</code> in questo modo (ovviamente campi e azioni possono variare):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configureListFields<span style="color: #009900;">&#40;</span>ListMapper <span style="color: #000088;">$listMapper</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$listMapper</span>
        <span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'abstract'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'position'</span><span style="color: #009900;">&#41;</span>
        <span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_action'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'actions'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'actions'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
              <span style="color: #0000ff;">'edit'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
              <span style="color: #0000ff;">'view'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
              <span style="color: #0000ff;">'delete'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
              <span style="color: #0000ff;">'moveUp'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'AcmeMioBundle:Article:_moveup.html.twig'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
              <span style="color: #0000ff;">'moveTop'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'AcmeMioBundle:Article:_movetop.html.twig'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Infine non resta che creare i template:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="twig" style="font-family:monospace;">{# Acme/MioBundle/Resources/view/Article/_moveup.html.twig #}
{% if object.position &gt; 0 %}
    &lt;a class=&quot;moveup_link&quot; href=&quot;{{ path('admin_article_moveup', {id: object.id}) }}&quot; title=&quot;Sposta su&quot;&gt;↑&lt;/a&gt;
{% endif %}
&nbsp;
{# Acme/MioBundle/Resources/view/Article/_movetop.html.twig #}
{% if object.position &gt; 1 %}
    &lt;a class=&quot;movetop_link&quot; href=&quot;{{ path('admin_article_movetop', {id: object.id}) }}&quot; title=&quot;Sposta in cima&quot;&gt;↑↑&lt;/a&gt;
{% endif %}</pre></td></tr></table></div>

<p>Purtroppo non ho potuto implementare lo spostamento in giù, non avendo ancora trovato il modo di verificare che la posizione non sia già l&#8217;ultima.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/690/sonata-e-sortable/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=zpgMy8OTrns:p27gsYPaSl0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=zpgMy8OTrns:p27gsYPaSl0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=zpgMy8OTrns:p27gsYPaSl0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=zpgMy8OTrns:p27gsYPaSl0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=zpgMy8OTrns:p27gsYPaSl0:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/690/sonata-e-sortable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/690/sonata-e-sortable/</feedburner:origLink></item>
		<item>
		<title>Symfony 2.1 validazione a cascata</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/7RRp5BDYqnM/</link>
		<comments>http://www.symfony.it/articoli/674/symfony-2-1-validazione-a-cascata/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 19:14:42 +0000</pubDate>
		<dc:creator>Shark</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[cascade_validation]]></category>
		<category><![CDATA[embedded form]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[symfony 2.1]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=674</guid>
		<description><![CDATA[In Symfony2 incorporare i form è davvero facile come mostrato  nella guida ufficiale di Symfony per la creazione e l&#8217;associazione di due form. In questo tip parleremo della validazione in cascata di sottoform. Supponiamo di avere un ProductForm che incorpora CategoryForm, &#8230; <a href="http://www.symfony.it/articoli/674/symfony-2-1-validazione-a-cascata/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In Symfony2 incorporare i form è davvero facile come mostrato  nella <a href="http://symfony.com/it/doc/current/book/forms.html#incorporare-un-oggetto-singolo" target="_blank">guida ufficiale di Symfony</a> per la creazione e l&#8217;associazione di due form.</p>
<p>In questo tip parleremo della validazione in cascata di <em>sottoform.</em></p>
<p>Supponiamo di avere un ProductForm che incorpora CategoryForm, entrambi con annotazioni che impostano i diversi vincoli di validazione per ciascuna classe. Seguendo la guida scriveremmo in ProductForm:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$builder</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">new</span> CategoryForm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Ci aspettiamo che CategoryForm sia inglobato in ProductForm e ciascun campo automaticamente validato in base ai vincoli di validazione di CategoryForm e ProductForm.</p>
<p>Noteremo con stupore, che dalla versione 2.1 di Symfony CategoryForm non viene validato automaticamente.</p>
<p>Questo è dovuto all&#8217;introduzione di un settaggio specifico dei form: <em>cascade_validation</em></p>
<p>Il parametro, infatti, suggerisce al form builder se validare il form incorporato. Di default questo settaggio è impostato a <em>false</em>, quindi per validare il nostro <em>sottoform</em> con i vincoli di validazione specificati nella classe, c&#8217;è bisogno di esplicitare a <em>true</em> l&#8217;opzione nella classe CategoryForm, nella funzione <em>setDefaultOptions </em>:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setDefaultOptions<span style="color: #009900;">&#40;</span>OptionsResolverInterface <span style="color: #000088;">$resolver</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$resolver</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setDefaults</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'data_class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'namespace\entita\correlata'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'cascade_validation'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Così facendo, ProductForm provvederà a validare anche tutti i campi di CategoryForm.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/674/symfony-2-1-validazione-a-cascata/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=7RRp5BDYqnM:03QvgcTRP7Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=7RRp5BDYqnM:03QvgcTRP7Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=7RRp5BDYqnM:03QvgcTRP7Y:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=7RRp5BDYqnM:03QvgcTRP7Y:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=7RRp5BDYqnM:03QvgcTRP7Y:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/674/symfony-2-1-validazione-a-cascata/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/674/symfony-2-1-validazione-a-cascata/</feedburner:origLink></item>
		<item>
		<title>velocizzare il deploy con capifony</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/C0FZD_Ewrp8/</link>
		<comments>http://www.symfony.it/articoli/666/velocizzare-il-deploy-con-capifony/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 13:42:10 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[symfony2]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[capifony]]></category>
		<category><![CDATA[deploy]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=666</guid>
		<description><![CDATA[Come probabilmente saprete, Capifony (per chi non lo conoscesse, è lo standard de facto per gestire i deploy su Symfony2) purtroppo ha un&#8217;impostazione predefinita che reinstalla tutti i vendor a ogni deploy. Questo vuol dire che ogni volta che facciamo &#8230; <a href="http://www.symfony.it/articoli/666/velocizzare-il-deploy-con-capifony/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Come probabilmente saprete, Capifony (per chi non lo conoscesse, è lo standard <em>de facto</em> per gestire i deploy su Symfony2) purtroppo ha un&#8217;impostazione predefinita che reinstalla tutti i vendor a ogni deploy. Questo vuol dire che ogni volta che facciamo un deploy dobbiamo aspettare che il server di produzione (o comunque il server su cui stiamo eseguendo il deploy stesso) scarichi da github tutte le librerie necessarie. Ogni volta, anche se molto probabilmente le librerie dei vendor non sono state modificate dal deploy precedente. In realtà, quando anche fossero state modificate, per esempio per un aggiornamento di Symfony, non sarebbe più efficiente scaricare <strong>solo</strong> le modifiche, piuttosto che tutto quanto? Dopotutto, è esattamente ciò che facciamo sulle nostre macchine di sviluppo.<br />
Ecco una possibile soluzione, da riportare nel proprio file di configurazione deploy.rb.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># app/config/deploy.rb</span>
<span style="color:#008000; font-style:italic;"># [...]</span>
set <span style="color:#ff3333; font-weight:bold;">:vendors_mode</span>, <span style="color:#996600;">&quot;install&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:update_vendors</span>, <span style="color:#0000FF; font-weight:bold;">true</span>
before <span style="color:#996600;">&quot;symfony:vendors:install&quot;</span>, <span style="color:#996600;">&quot;symfony:copy_vendors&quot;</span>
&nbsp;
namespace <span style="color:#ff3333; font-weight:bold;">:symfony</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">&quot;Copy vendors from previous release&quot;</span>
  task <span style="color:#ff3333; font-weight:bold;">:copy_vendors</span>, <span style="color:#ff3333; font-weight:bold;">:except</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:no_release</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    pretty_print <span style="color:#996600;">&quot;--&gt; Copying vendors from previous release&quot;</span>
    run <span style="color:#996600;">&quot;cp -a #{previous_release}/vendor/* #{latest_release}/vendor/&quot;</span>
    puts_ok
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Aggiornamento: il codice, ampliato e migliorato, è stato pubblicato come <a href="http://capifony.org/cookbook/speeding-up-deploy.html">ricetta</a> sul sito di Capifony.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/666/velocizzare-il-deploy-con-capifony/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=C0FZD_Ewrp8:oAFSapX1Jag:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=C0FZD_Ewrp8:oAFSapX1Jag:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=C0FZD_Ewrp8:oAFSapX1Jag:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=C0FZD_Ewrp8:oAFSapX1Jag:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=C0FZD_Ewrp8:oAFSapX1Jag:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/666/velocizzare-il-deploy-con-capifony/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/666/velocizzare-il-deploy-con-capifony/</feedburner:origLink></item>
		<item>
		<title>anche eZ publish adotta Symfony2</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/3Kv8JiO5g1c/</link>
		<comments>http://www.symfony.it/articoli/662/anche-ez-publish-adotta-symfony2/#comments</comments>
		<pubDate>Mon, 02 Jul 2012 15:38:29 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[components]]></category>
		<category><![CDATA[symfony2]]></category>
		<category><![CDATA[componenti]]></category>
		<category><![CDATA[ez]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=662</guid>
		<description><![CDATA[Come già sapete, i componenti di Symfony2 sono stati già adottati da due grossi progetti open source, phpBB e Drupal, per i loro prossimi rilasci maggiori. A questi, da oggi si aggiunge un altro progetto molto importante: eZ publish! Il &#8230; <a href="http://www.symfony.it/articoli/662/anche-ez-publish-adotta-symfony2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Come già sapete, i <a href="http://symfony.com/it/doc/current/components/index.html">componenti di Symfony2</a> sono stati già adottati da due grossi progetti open source, phpBB e Drupal, per i loro prossimi rilasci maggiori.<br />
A questi, da oggi si aggiunge un altro progetto molto importante: eZ publish! Il celebre sistema di gestione di contenuti l&#8217;ha infatti <a href="http://share.ez.no/blogs/ez/an-explosive-cocktail-symfony-and-ez-publish-5-joining-forces">annunciato</a> proprio oggi, subito <a href="http://symfony.com/blog/symfony2-meets-ez-publish-5">ripreso</a> dal blog ufficiale di Symfony, per la versione 5, tra l&#8217;altro già disponibile su gtihub.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/662/anche-ez-publish-adotta-symfony2/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=3Kv8JiO5g1c:s3R_FwWaBFI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=3Kv8JiO5g1c:s3R_FwWaBFI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=3Kv8JiO5g1c:s3R_FwWaBFI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=3Kv8JiO5g1c:s3R_FwWaBFI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=3Kv8JiO5g1c:s3R_FwWaBFI:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/662/anche-ez-publish-adotta-symfony2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/662/anche-ez-publish-adotta-symfony2/</feedburner:origLink></item>
		<item>
		<title>Symfony live 2012 – giorno 2</title>
		<link>http://feedproxy.google.com/~r/Symfony-it/~3/5bXkWFi47AM/</link>
		<comments>http://www.symfony.it/articoli/649/symfony-live-2012-giorno-2/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 07:52:01 +0000</pubDate>
		<dc:creator>Massimiliano Arione</dc:creator>
				<category><![CDATA[eventi]]></category>
		<category><![CDATA[sflive]]></category>

		<guid isPermaLink="false">http://www.symfony.it/?p=649</guid>
		<description><![CDATA[Il secondo giorno inizia con un talk in track unica di David Zuelke. Purtroppo si tratta ancora di Designing HTTP interfaces and RESTful web services. Il titolo vi dice qualcosa? Se avete partecipato almeno a una conferenza su PHP nell&#8217;ultimo &#8230; <a href="http://www.symfony.it/articoli/649/symfony-live-2012-giorno-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.symfony.it/wp-content/uploads/2012/06/2012-06-08-09.39.54.jpg"><img class="alignleft size-thumbnail wp-image-650" title="HTTP interfaces" src="http://www.symfony.it/wp-content/uploads/2012/06/2012-06-08-09.39.54-150x150.jpg" alt="" width="150" height="150" /></a> Il secondo giorno inizia con un talk in track unica di David Zuelke. Purtroppo si tratta ancora di <em>Designing HTTP interfaces and RESTful web services</em>. Il titolo vi dice qualcosa? Se avete partecipato almeno a una conferenza su PHP nell&#8217;ultimo lustro, c&#8217;è una buona probabilità che l&#8217;abbiate già visto.<br />
Purtroppo la presenza di tre track, invece delle due di ieri, ci consentirà una copertura inferiore dell&#8217;evento.</p>
<hr style="clear: left;" />
<p>Il talk in francese di William Durand su Propel2 ha evidenziato lo stato attuale di questo ORM, che sta cercando di recuperare la strada perduta rispetto a Doctrine. La buona notizia è che Propel2 sarà un refactoring della versione 1.6, quindi con le stesse funzionalità. Rispetto alla vecchia versione, ci sono numerosi miglioramenti: supporto solo da PHP 5.3.3, coding standard rivisto, aderenza a PSR-0 (Propel2 è nel FIG), componenti di Symfony2 al posto di phing (ma non solo), adapter per poter non usare PDO, supporto ai traits su 5.4.</p>
<hr style="clear: left;" />
<p>Gli onnipresenti Stof e Lukas hanno tenuto un talk sui bundle. Dopo una breve introduzione su cosa sono i bundle e su dove sia possibile trovarli (ovviamente su <a href="http://knpbundles.com">knpbundles</a>!), hanno mostrato una carrellata di best practice per crearne di nuovi: struttura delle cartelle, licenza (meglio MIT), configurazione del DIC, uso di composer, scrittura di test, interazione con travis, ovverride di controllori, gestione di bugfix e di pull request su github. Infine, hanno mostrato alcuni dei bundle più famosi e più usati (molti dei quali scritti da loro stessi), come fosuser, fosrest, stofdoctrineextension, knpmenu, liipimagine, eccetera.</p>
<hr style="clear: left;" />
<a href="http://www.symfony.it/wp-content/uploads/2012/06/2012-06-08-14.22.20.jpg"><img src="http://www.symfony.it/wp-content/uploads/2012/06/2012-06-08-14.22.20-150x150.jpg" alt="" title="Drupal 8" width="150" height="150" class="alignleft size-thumbnail wp-image-657" /></a> Larry Garfield ha tenuto un talk sulla situazione di Drupal e sull&#8217;integrazione prevista in Drupal 8 di diversi componenti di Symfony. Ha riconosciuto e messo in evidenza i limiti di questo popolare CMS, dovuti secondo lui soprattutto al fatto che è un progetto partito oltre un decennio fa. Ha poi esposto tutti i miglioramenti in vista per Drupal, sia relativamente a come saranno integrati i componenti, sia alle pratiche di svilippo e di gestione del progetto. </p>
<hr style="clear: left;" />
<p>Purtroppo ho dovuto saltare uno slot, per presentare un lighting talk nell&#8217;unconference.<br />
<a href="http://www.symfony.it/wp-content/uploads/2012/06/2012-06-08-16.39.02.jpg"><img src="http://www.symfony.it/wp-content/uploads/2012/06/2012-06-08-16.39.02-150x150.jpg" alt="" title="Buchmann" width="150" height="150" class="alignleft size-thumbnail wp-image-659" /></a>In chiusura, David Buchmann, già speaker al phpDay, ha parlato di Symfony2 e agile. Dopo una non breve introduzione all&#8217;agile, ha evidenziato come Symfony si adatti bene a chi voglia seguire le pratiche agili: modularità, separazione (grazie al DIC), testabilità, possibilità di sviluppare codice che sia a sua volta modulare (per esempio usando i controllori come servizi). A seguire, diversi consigli su come scrivere i test e quali bundle possono aiutare (per esempio JMSCommandBundle e LiipFunctionalTestBundle). Non poteva mancare l&#8217;invio all&#8217;utilizzo di travis.</p>
<hr style="clear: left;" />
<p>Per completezza, nei track non coperti qui si è parlato di: Service Container, ORM e prestazioni, PHPCR, Redis, Behat, Solr, CMF, un case study su Overblog, sysadmin skills, PostgreSQL, websockets.<br />
Purtroppo è mancato un intervento conclusivo: dopo le ultime sessioni, ci sono stati dei lighting talk in track principale, poco convincenti, anche se a dire il vero sono andato via prima che finissero.</p>
<p>In conclusione: un evento sicuramente migliorato rispetto allo scorso anno (due difetti evidenti, cibo e connessione, sono stati risolti una volta per tutte), ma che non dà ancora l&#8217;impressione di essere ai livelli di due anni fa. Speriamo nel 2013.</p>
<div class='wpfblike' style='height: 40px;'><fb:like href='http://www.symfony.it/articoli/649/symfony-live-2012-giorno-2/' layout='default' show_faces='true' width='400' action='like' colorscheme='light' send='false' /></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Symfony-it?a=5bXkWFi47AM:oKHTn4_VHnM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Symfony-it?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=5bXkWFi47AM:oKHTn4_VHnM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=5bXkWFi47AM:oKHTn4_VHnM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Symfony-it?a=5bXkWFi47AM:oKHTn4_VHnM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Symfony-it?i=5bXkWFi47AM:oKHTn4_VHnM:V_sGLiPBpWU" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.symfony.it/articoli/649/symfony-live-2012-giorno-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.symfony.it/articoli/649/symfony-live-2012-giorno-2/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
