Happy new year!

Jan
5

I wish to all of you, geek people, a happy new year fulfilled with good practises, lot of passing tests and, of course, a lot of clients!

The sfValidatorPropelUnique in symfony

Nov
17

Today, I wanted to do a signup form but I wanted distinct email addresses to be recorded. After some googlisations, I’ve spotted two problems.

As my field was an email address I thought something like “damn easy, I just have to use something like this: ”

$this->validatorSchema['email_1'] = new sfValidatorAnd(array(
  1.     new sfValidatorEmail(); ,
  2.     new sfValidatorPropelUnique(array(
  3.             'model' => $this->getModelName(),
  4.             'column' => 'email_1'
  5.          ),
  6.          array(
  7.              'invalid' => 'This email address is already assigned to an account.',
  8.          )
  9.     )
  10. ));

Though, after few tries I had an error that I’ve never seen before, saying that it has to be used as a postValidator. Before I understood how to deal with that, I’ve figured out something: I should simply add in my schema

  1. index: unique

in my email field… Damn… But since I’m definitly 2 cool, here is the correct syntax to use in your UserForm.class.php (basically, it shouldn’t be used if you defined correctly your schema.yml though!) :

$this->validatorSchema->setPostValidator(
  1.             new sfValidatorPropelUnique(array(
  2.                 'model' => 'User',
  3.                 'column' => array('email_1')
  4.             ),
  5.             array(
  6.                 'invalid' => 'An account is already registered with this email address.',
  7.             )
  8.         ));

Once again, thanks symfony to allow us escaping from so much troubles !

Propel 1.4.0 stable has been released

Nov
8

The stable version of Propel 1.4.0 has been released today. The official annouce has been made on the new official Propel’s blog. You could find here:

You could also find in the official documentation what is new in Propel 1.4.

Yo, what’s up Propel 1.4 ?

Oct
13

Propel 1.4
Read more »

Running numerous symfony versions using MAMP on Mac OS X

Sep
26

I was basically going to simply translate the symfony multi install tutorial I wrote ages ago but I realised, now that I have more knowledge, that this way wasn’t improved at all. So here is a quickest and cleaner way to run multiple symfony versions on a Mac using MAMP.
Read more »

There we are !

Aug
31

It’s been a while that I bought this domain name and was planning to do “something” with it. Finally, I’ve taken a decision! As you can see, this blog will be dedicated about developpement and all related stuff.

The other one, xavismeh.com, will be used only for personnal posts. As you figured out, this blog will tend to cover more serious topics. It will be written, from now on, in english as well for two reasons:

  • writing in english will allow to involve more developpers
  • this is a good way for me to practise my english !

I don’t know yet if I will translate the previous posts, but for now, I’m thinking about leaving it on the other blog in french and translating them in here. I’ve came up to this decision after seeing the Google Analytics statistics: lot of people are reading the posts simply because it’s in french, I guess… If you have any idea about that (or anything else!), just let me know about it.

So for now, you could only find the content (in french) itself and no much more ! Next step will be adding plugins, mostly social networking aimed. Stay tuned

Put your CSS, Javascripts and pictures files into subdomains using symfony

Jul
27

A quick post concerning a problem I got when I started to move this blog to a symfony application. By the way, there’s still no release date planned yet considering the time I have for it. But let’s go back to this problem.
Read more »

Orange a tué Android ?

Mar
19

C’est tout discrètement que Orange vient de mettre en vente le HTC G1 rebaptisé pompeusement pour l’occasion en HTC Dream alors que SFR se prépare à sortir également son smartphone utilisant Android appelé HTC Magic qui sera, quant à lui, totalement tactile. Read more »

Référencement: victoire par presque KO !

Mar
11

1 mois et 3 jours auront été nécessaires pour enfin arriver à passer devant Xavier Lacot! En guise de trophée, rien de tel qu’une capture d’écran! Celà dit, petit rappel de ce challenge, le but était de passer en tête de Google sur la recherche xavier symfony. Autant dire que le travail n’est pas encore terminé! Mais ce n’est pas pour autant que j’oublierai la preuve en image! :D

Guerre du référencement

Un rêve d'ado

Mar
3

Quand j’étais un très jeune nolife, y’a environ 8 ans, j’ai eu l’occasion de rentrer en contact avec des gens dispatchés un peu partout en Europe. J’ai connu un certain Isak, Suédois, avec qui on s’est super bien entendu et avec qui je “partageais mes petits ennuis de tous les jours”, un vrai ami virtuel en somme. Les obligations de la vie ne nous ont pas permis de garder contact comme on l’aurait souhaité, mes 2 ans dans l’armée n’ont aidés en rien mais finalement nous avons réussi à se “revoir”.

Et pendant nos longues soirées à refaire le monde, j’avais bien rigolé lorsqu’il m’avait sorti un truc du genre “m8, you’re 2cool4school!” [mec, t'es trop cool pour l'école]. Voilà, aujourd’hui, je lui rends un petit hommage en annonçant très fièrement que je viens de devenir le nouveau propriétaire du domaine 2cool4school.fr ! Les DNS ne sont pas encore actifs, il le seront, d’après les informations que j’ai eu, demain dans la journée.

Aussi, ce domaine va devenir petit à petit mon nom de domaine professionnel! Bein oui, un idiot reste un idiot!