Transcript of Symfony Plugin Developers Day IRC log

I am currently looking into putting some of functionality from various symfony (you probably heard about the really good and already famous symfony-project PHP Framework) projects into plugins for easier reuse. I stumbled upon a recent blog entry about the Plugin Developers Day held in IRC Chat. There is a link to the IRC log file. I was going to have a read, but do not use IRC. I therefore wrote a quick and dirty PHP script to parse it into very basic html, as it might be interesting for others as well to read about the plugin development for symfony.

Nebelmann: kriswallsmith: don’t you think that the plugin day discussions will be mixed with unrelated discussions?
SecureSymfony: Quickdev: Stay, everyting will be explain!
kriswallsmith: Nebelmann: i was considering moving into another channel if that becomes an issue
Nebelmann: ok πŸ™‚
Garfield-fr: kriswallsmith:
quickdev: SecureSymfony, is there a time when it starts? Or isn’t there a fixed time?
SecureSymfony: It normally not a big problem!
Should begin now!
lukaswoj: yea πŸ™‚
SecureSymfony: Kris : should you begin?
kriswallsmith: Garfield-fr: this works for me by running “export SYMFONY=/path/to/symfony/lib”
Garfield-fr: i haven’t tried that on windows yet though
Garfield-fr: the technique may need adjusting
Nebelmann: who runs windows anyway? πŸ™‚
Garfield-fr: Not good solution because i have 3 versions on my laptop
kriswallsmith: SecureSymfony: yes, let’s get started!
SecureSymfony: Garfield : SET SYMFONY
Garfield-fr : You can set it in your APACHE
Garfield-fr: For basic user, this is not a good idea
kriswallsmith: the first “session” lasts for two hours — “Creating and releasing a plugin”
digitalbase: can anyone tell me howto set the selected values of a sfWidgetFormSelectMany ? (“sfWidgetFormSelectMany does not support the following options: ‘value’.”)
kriswallsmith: before we get into that i’d like to chat a bit about when it’s a good time to create a plugin
Garfield-fr: And the path is inspired from symfony test dir
digitalbase: kriswallsmith, i am here for developers day, although i can’t stay that long, have a suprise party in 3hrs
kriswallsmith: i personally am creating many more plugins than i’m releasing to the community
working with plugins more as packages of what i reuse between projects
is anyone else working like this?
kjaer_: Yes.
klemens_u: yes, I do
fabpot: yep, a lot
Nebelmann: I only work on 1 project atm
nervo: also
fabpot: I never use the modules directory of the apps
everything in a plugin
pcahard: I have never share my plugins, but I will
fabpot: or plugins for that matter
klemens_u: especiall for reusable parts on multiple projects
nervo: i also use plugins when a functionnal process need to shqre elements in many different places
klemens_u: fabpot: same for me
fabpot: klemens_u: even without sharing things between projects
fabpot: it is a nice way to organize your projects
hal: hello guys, sorry I’m late! πŸ˜‰
klemens_u: pcahard: thats my idea for today as well
mauro123: hi all
kriswallsmith: yes, i think it’s an excellent workflow
Henrik|away: kriswallsmith: yes a good idea, especially when you have more websites who share functionality and not design, ex. the plugin modules can be overwritten in the app module template folder
klemens_u: fabbot: right.
kriswallsmith: so we are trying to streamline this for everyone with some new tasks in the sfTaskExtraPlugin
quickdev: kriswallsmith, I’m working like that. Have many unreleased plugins shared between my projects, too.
digitalbase: fabien told something on the symfony camp that for most applications he groups functionality into plugins, instead of putting everything in the application
Henrik|away: fabpot: nope that way you are using the plugin dir as a modules directory imo
Nebelmann: digitalbase: that’s what he just said πŸ™‚
digitalbase: yeah, and that’s what i am confirming πŸ™‚
kriswallsmith: there are only a few in there right now, but it will grow to easy some of the more cumbersome parts of this process
nervo: it seems that we all undestand well the concept of “plugin” πŸ™‚
kriswallsmith: s/easy/ease
fabpot: Henrik|away: not really, this way a plugin can nicely package the model, modules, libs, tasks, …
fdb1: bonjour
digitalbase: one thing would be nice to talk about ( a downside of using plugins for grouped functionality) is using foreign keys between different schema.xmls
Henrik|away: yes but still if you are not gonna share it someway or anothen then i breaks the directory structure and you are just changing the directory structure
kriswallsmith: hello fdb1
fdb1: hello
klemens_u: kris: can you give a short introduction on the features of the sfTaskExtraPlugin please?
Nebelmann: but why put everything in plugins if the business rules can’t be applied to other apps?
kriswallsmith: digitalbase: i’ll make a note
Henrik|away: Nebelmann: my point exactly
hal: digitalbase, yes, that is something that I want to know about
lukaswoj: digitalbase: yea, me too
klemens_u: digitalbase: is this a propel specific problem? I think so because it works well in doctrine
digitalbase: i think so, we’ll talk about that later, because there are some workarounds, but i’ll leave it up to kriswallsmith to start that discussion
SecureSymfony: Klemens_u: there is a new blog of sfTaskExtraPlugin :
hal: to be clear, digitalbase, are you also talking about , dependencies on other plugins, and making the new plugin work regardless of whether a specific plugin is installed? Let me give an example…
klemens_u: kriswallsmith: taking notes is good idea. I think we need to focus on one theme at a time, or its gonna… (140 people!)
kriswallsmith: the latest article in the plugins tag give a good introduction to the new tasks
digitalbase: hal, just linking a foreign key to another plugin. For example you create a NewsPlugin, in newsitem you want to define a FK to This will fail when building the model
hal: digitalbase, say you built a forum plugin, and you have a table with a createdby_user column which is a FK to the sfGuardUser table. How do you make your plugin easily work with another user-management plugin? (maybe the user already has his own custom user-management or auth module built into the app_
digitalbase: kriswallsmith, any thoughts/ideas on porting this plugin to 1.1 too ?
hal, i personally don’t think this is something we should get into detail now. I am sure we can talk about this later today
annis: you’d have to make that a config variable (user_id_FK_table.user_id_FK_name)
Nebelmann: fabpot: I understand why you only use plugins, but then what can the apps/modules dir be used for?
SecureSymfony: hal: This should be discuss later
kriswallsmith: i need suggestions for a new plugin we can talk through the creation of
any ideas?
fabpot: Nebelmann: it is just another way to code. Both have advantages
digitalbase: kriswallsmith, with or without the reference to a “foreign” schema.xml ?
Henrik|away: kriswallsmith: a faker like plugin to generate test data
that are realistiv
hal: Nebelmann, I second that question – what would you leave in the app?
Henrik|away: mayb inspired by Ruby Faker gem
kriswallsmith: is everyone familiar with sfGuardPlugin?
jamiel: I think the apps/modules directory will always be neccessary, but I like the idea of packaging reusable components in plugins
hal: kriswallsmith, yes
fabpot: hal: app.yml and general settings, that’s all
digitalbase: i think we should keep it simpler. maybe make a sfNews plugin or something ?
quickdev: kriswallsmith, I would have a plugin idea
hal: fabpot, ok, thank you
Nebelmann: but it’s not easy to think of what *could* be reused in another project…
SecureSymfony: Please, can we stay on track… Those are good questions, that we’ll talk later!
annis: kriswallsmith: building manageable navigations
but I’m familiar with sfGuardPlugin (how about adding the ability to explicitly removing privileges from users/groups?)
digitalbase: guys, this plugin will be used as a reference, it will not be a fully featured plugin, lets keep it simple
quickdev: KRISWALLSMITH, atm I’m trying to create a plugin for my test environment. The plugin should be able to load and save various ‘scenarios’ for application testing. For example “User is registered” or “User A is in State xy”. To test some things in those situations.
hal: Whatever example app you build, please ensure it has multiple tables, with a mix of relations (ie 1-2-m and m2m
KRISWALLSMITH: since it’s an excellent example that we’re all familiar with, let’s talk through how we would write sfGuardPlugin if it didn’t already exist
annis: cool
digitalbase: my suggestions : sfNewsPlugin, sfGuardSignupPlugin, sfGuardUserProfilePlugin
hal: KRISWALLSMITH, using doctrine or propel?
pacogliss: is it possible to build a whole APP as a plugin ? (not a module or less)
[MA]Pascal: KRISWALLSMITH, with admin gen 1.2 compatability πŸ™‚
annis: see, two sfGuard things in there! (@digitalbase)
KRISWALLSMITH: i am not on the doctrine bandwagon yet, so let’s stick to propel for this first example
SecureSymfony: Kris : Nice!
annis: good, me too
hal: KRISWALLSMITH, be careful – the doctrine bandwagon will leave without you!! πŸ˜‰
KRISWALLSMITH: first — since this is a propel plugin — the name is not quite right
digitalbase: hal : -)
clansuite|xsign: is away ( – just an eSport CMS)
Nebelmann: is a plugin some kind of app which can be embedded in any project?
KRISWALLSMITH: if you use an ORM, include its name in your plugin’s title
annis: So, Kris… can we code along you? (sf1.2 sandbox?)
hal: Nebelmann, yes
Nebelmann: so why should we package everything in an app if it’s only designed for on project?
annis: everyone, please stop talking and let Kris take the lead. πŸ™‚
Nebelmann: /on/one
KRISWALLSMITH: so we’ll call this plugin “myPropelGuardPlugin” … agreed?
hal: Nebelmann, the only part worth putting into a plugin are parts that are useful in other apps
annis: +1
digitalbase: agreed
KirilAngov: ok
lukaswoj: +1
SecureSymfony: Nebelmann : It’s more a module that a complet app… Usually.
jamiel: KRISWALLSMITH: If we were going to release this to the world later, would it be sfPropelGuardPlugin ?
rather than my ?
Nebelmann: jamiel: it’s just an example…
I don’t think it’ll be released
KRISWALLSMITH: yes, i’m using “my” for the purpose of this example
Nebelmann: as sfGuardPlugin is already a good plugin
KRISWALLSMITH: to avoid confusion
jamiel: I know … I mean, is sf a requirement for plugins ? because there are some with different prefixes in the repo
KRISWALLSMITH: anyway… i have a clean copy of the latest symfony 1.2 development checked using Subversion
JPhilip: Plugins now have a a Doctrine and Propel version, can we write plugins that are used for both like Symfony where a new data access layer could be added later?
KRISWALLSMITH: so to create a new project on my mac, i open terminal and enter…
cd Sites
KRISWALLSMITH: mkdir my_plugin_sandbox
cd my_plugin_sandbox
~/Sites/symfony/1.2/data/bin/symfony init-project my_plugin_sandbox
i’ll give folks a minute to do that…
hal: KirilAngov, I haven’t used the sandbox before – is it fully self-contained
KRISWALLSMITH, sorry, that was to you!
annis: well, that doesn’t work so well, since I only downloaded the sandbox from the site and don’t have the latest svn version
KRISWALLSMITH: next step is to install the sfTaskExtraPlugin
hal: KRISWALLSMITH, so I can run that alongside my other installations, and it won’t affect them?
annis: yes, you can
jamiel: @hal: this “sandbox” is just a fresh 1.2 project ..
KRISWALLSMITH: ./symfony plugin:install sfTaskExtraPlugin –release=0.0.1 –stability=alpha
annis: keep going Kris
hal: what is the svn url of the sandbox install?
jamiel: hal, just grab the latest 1.2 branch
KRISWALLSMITH: the plugin’s still an infant — 0.0.1-alpha πŸ™‚
annis: damnit, I only have php 5.2.3 and not 5.2.4 😦
pcahard: about installation of plugins any solution for specify the release of symfony in argument than the release of the plugin ?
KRISWALLSMITH: to step back — you can checkout the symfony 1.2 branch where i have it (above) like so…
mkdir ~/Sites/symfony
svn co ~/Sites/symfony
do people have the sfTaskExtraPlugin installed?
jamiel: Yup
lukaswoj: me too
KRISWALLSMITH: ./symfony list generate
hal: KRISWALLSMITH, nope – what’s the url?
JPhilip: not yet
annis: not yet
KRISWALLSMITH: hal: ./symfony plugin:install sfTaskExtraPlugin –release=0.0.1 –stability=alpha
hal: KRISWALLSMITH, it would have been good to have a list of system requirements in the announcement, so that we could all have set our systems up before it started
KRISWALLSMITH: hal: or svn co plugins/sfTaskExtraPlugin
ok, let’s generate our plugin now
./symfony generate:plugin myPropelGuardPlugin
just found a bug in the pear version of the plugin — you’ll have to manually create your plugin’s /lib folder
let’s take a quick look at what’s been generated here
KRISWALLSMITH: first look at /config/myPropelGuardPluginConfiguration.class.php
plugin configuration classes are a new feature in symfony 1.2
Nebelmann: like project config in 1.1?
KRISWALLSMITH: Nebelmann: correct
one thing we can do here, for instance, is check to make sure the propel plugin is enabled
mosez: lol, damn jquery plugin… i get a 411 reply from my webserver for an ajay request πŸ˜€
digitalbase: fabpot, any thoughts on this ?
could we briefly make a list of things that are considered ‘good usage’ in the configuration class ?
KRISWALLSMITH: this can be done in the ->initialize() method by trying to call ->getPluginConfiguration(‘sfPropelPlugin’)
hal: sadly I won’t be able to follow your tutorial line by line, as it will take quite a while to set 1.2 up. I will just have to try to follow it as you explain it ;-(
mosez: ah, i got it… it have to send it as get
KRISWALLSMITH: the plugin configuration class replaces what was config.php in < 1.2
mahono: hi
KRISWALLSMITH: so this is where you’ll connect to events ($this->dispatcher)
or register propel behaviors — sfPropelBehavior::register(Methods|Hooks)
peper: is there a date time form widget different from the one using 5 lists?
jscheel: bmeynell: hey, sorry I missed your messages last night. I fell asleep at the computer πŸ˜›
digitalbase: so : connect to events, checking/enabling other plugins, registering behavious, check for certain dependancies
KRISWALLSMITH: digitalbase: right.
that list may grow as more devs begin to use these classes though
JPhilip: Can we create an ORM independent plugin instead of a propel specific? and add data access layers later.
KRISWALLSMITH: fabpot: do you want to add to what belongs in a configuration initialization?
digitalbase: JPhilip, i don’t think you can, if you really want ORM independancy (propel/doctrine) you could make a dbFinder plugin
jamiel: Maybe adding conditional routes can go in there?
digitalbase: no πŸ™‚
JPhilip: It is just a pain to have 2 versions of each plugin that does data access
KRISWALLSMITH: jamiel: yes, adding routes is done using $this->dispatcher->connect()
digitalbase: routing rules should go in : myPropelGuardPluginRouting.class.php
you only register those in the config
KRISWALLSMITH: so our config class looks something like this:
KRISWALLSMITH: there’s plenty more that can be done there, but let’s move on for now
KRISWALLSMITH: should we take a look at the test directory next, or start building the plugin?
lukaswoj: test first imo πŸ™‚
jamiel: Yes please, I have two questions regarding the test directory
Unless it’s going to be covered later in functional testing your plugin
Nebelmann: KRISWALLSMITH: I have problems accessing hashbin…
KRISWALLSMITH: let’s write a unit test to verify the exception we’ve added to the configuration class
klemens_u: yes, pls TDD
KirilAngov: KRISWALLSMITH: same here
Nebelmann: well, works, but with /td2 it doesn’t πŸ™‚
lukaswoj: should’nt we add test first ? πŸ˜‰
KRISWALLSMITH: i’ve created a /test/unit/configurationTest.php in myPropelGuardPlugin:
klemens_u: KRISWALLSMITH: @testing plugin: Bernhard Schussek and I would like to talk a bit more about this topic
Can you take a note on that?
KRISWALLSMITH: klemens_u: ok — you guys can say some about testing plugins after we write this test?
klemens_u: We can do this later
It’s more like questions not a speech πŸ™‚
KRISWALLSMITH: klemens_u: ok
klemens_u: after we write this test
klemens_u: ok
KRISWALLSMITH: here’s the unit test i wrote —
does this make sense to everyone?
lukaswoj: kris: where You put that code ?
KRISWALLSMITH: that test is in /plugins/myPropelGuardPlugin/test/unit/configurationTest.php
KRISWALLSMITH: you should be able to run this test successfully
php plugins/myPropelGuardPlugin/test/unit/configurationTest.php
or by using the harness provided
php plugins/myPropelGuardPlugin/test/bin/prove.php
any questions?
JPhilip: I get You must register some test files before running them!
jamiel: KRISWALLSMITH: Looks like we need to do your export SYMFONY=/path/to/1.2 ; trick
KRISWALLSMITH: JPhilip: where did you add the pastie test?
jamiel: correct
JPhilip: plugins/myPropelGuardPlugin/test/unit
KRISWALLSMITH: JPhilip: i’m not sure — it’s working for me
JPhilip: The command I ran is: symfony test:unit maybe this is wrong for a plugin
KRISWALLSMITH: JPhilip: that command doesn’t include the plugin tests
KRISWALLSMITH: JPhilip: perhaps later… but not at this point
klemens_u: JPhilip: that’s one point we’d like to talk about later on.
KRISWALLSMITH: you need to either run the test or the harness directly
klemens_u: I’ve created a wiki entry about plugin testing, where I took some notes on what features would be nice:
KRISWALLSMITH: (the harness being bin/prove.php)
SecureSymfony: Kris : plugin:runtest should be add to sfTaskExtraPlugin
mirsal: Hello
KRISWALLSMITH: klemens_u: this looks like part of the roadmap for sfTaskExtraPlugin (which currently exists only in my head…)
hi mirsal
KRISWALLSMITH: anyone still working on getting configurationTest working?
bschussek: kris: I guess this could perfectly be added to the core though
KRISWALLSMITH: any questions about that script?
klemens_u: KRISWALLSMITH: please add your ideas, or tell us if they are already written anywhere
JPhilip: So I did not get the command to run the test!
KRISWALLSMITH: JPhilip: there’s no command at this point. you need to execute the script directly
php plugins/myPropelGuardPlugin/test/unit/configurationTest.php
klemens_u: does this wiki page sum up what you wanted to discuss, or would you like to take a few minutes now?
klemens_u: KRISWALLSMITH: in general it sums it up.
klemens_u: I have to say, some is already done by the sfTaskExtraPlugin.
good work!
EBSMobile: KRISWALLSMITH: wrote it now copying
I have a module called “main” which is really the home page. On it’s indexSuccess file I have included some partials (header, navigation) so I can reuse them in many areas of the site. On the header partial, i have a search area where you put a postcode and click submit it should take you to the next step in the process.
This is what I am trying to do: I want to show all the companies that are working within this post code.
My issues: 1. I am not sure where to create that second page in the process?
2. I am not sure how to change the content of the header partial? (I want to customise the content per step in the process)
KRISWALLSMITH: EBSMobile: is this a plugin issue?
EBSMobile: no
KRISWALLSMITH: klemens_u: thank you πŸ™‚
EBSMobile: trying to build my first project
klemens_u: KRISWALLSMITH: what is on your roadmap for the sfTaskExtraPlugin you mentioned before
KRISWALLSMITH: i would like to connect to command.post_command and modify new model and form classes to be easily customizable in the project — i haven’t thought that through all the way yet.
JPhilip: The test bootstrap does not find the Symfony libs when I run the test script directly on my config:
PHP Fatal error: Uncaught exception ‘RuntimeException’ with message ‘Could not
find symfony core libraries.’ in C:\DATA\php\sf_sandbox\plugins\myPropelGuardPlu
Stack trace:
#0 C:\DATA\php\sf_sandbox\plugins\myPropelGuardPlugin\test\unit\configurationTes
t.php(3): include()
#1 {main}
thrown in C:\DATA\php\sf_sandbox\plugins\myPropelGuardPlugin\test\bootstrap\un
it.php on line 5
mosez: knows somebody a helper to calculate kB, MB and GB out of bits?
Garfield-fr: JPhilip: Check this:
jamiel: JPhilip: export SYMFONY=/path … Path to where you checked out 1.2 to
mosez: sfFormatSizePlugin πŸ˜€
jamiel: Ahh, windows …
klemens_u: KRISWALLSMITH: and regarding plugin testing? what are your ideas on that?
KRISWALLSMITH: klemens_u: i’m also looking at using command.post_command to run plugin tests when when test:all is run, as you suggest on the wiki
chrisk89: well i have some more questions about functional testing of plugins
klemens_u: (maybe we should move to a separate irc channel?)
EBSMobile: KRISWALLSMITH: ha ha , found it , i could solve the second issue with a slot
chrisk89: how to test custom tasks?
bschussek: KRISWALLSMITH: maybe we should ask fabien, I think this functionality could well go into the core
KRISWALLSMITH: chrisk89: take a look at
JPhilip: OK, the test passes now
KRISWALLSMITH: chrisk89: it uses the task_extra_lime_test class defined in the plugin’s bootstrap/unit.php
chrisk89: KRISWALLSMITH: hm k, I’ll have a look
KRISWALLSMITH: i may move that class into /lib/test so it can be reused
we have another 30 minutes in this “session” — let’s get back to building the plugin?
unless there are outstanding questions?
ksn135: mosez:
rdeeb: One question
annis: my test is failing
rdeeb: sorry for beeing late
annis: 😦
rdeeb: just installed the sfTaskExtraPlugin and can access the tasks
annis: Failed 1/1 test scripts, 0.00% okay. 1/2 subtests failed, 50.00% okay.
jamiel: annis: Run the test directly to see the failure message
rather than using the harness
annis: configuration throws an exception if sfPropelPlugin is not enabled
hmm, but I followed along you guys
jamiel: annis: did you skip the step of creating your project config file?
annis: ah, that was it, because hasbin/td2 didn’t work
jamiel: annis:
mosez: ksn135: i dont want this?
peper: hmm
is there some more user-friendly date time picker for new forms?
mosez: ksn135: sfFormatSizePlugin
annis: now I’m with you, thanks!
KRISWALLSMITH: here’s the schema.yml i’ve created:
ksn135: mosez: Ough! πŸ™‚
FabianLange: topic repaired, kris πŸ™‚
KRISWALLSMITH: thanks FabianLange
does this schema make sense to everyone? it’s a basic users table.
any additions? removals?
annis: where do we put that schema? I gues it’s not config/schema.yml of the project?
KRISWALLSMITH: annis: plugins/myPropelGuardPlugin/config/schema.yml
jamiel: KRISWALLSMITH: Should we not namespace the classes?
Or does this happeny automatically?
mosez: kriswallsmith: why creating an own guard plugin?
KRISWALLSMITH: jamiel: good point
mosez: kriswallsmith: you know the profile feature for sfGuard?
mosez: we’re using this as an example
SecureSymfony: mosez : It’s a exemple… Because we all know the original version.
mosez: kriswallsmith: write table name in singular.
KRISWALLSMITH: mosez: personal preference. i prefer plural table names.
mosez: the original version? oO
KRISWALLSMITH: ./symfony propel:build-model
mosez: kriswallsmith: go and use ror πŸ˜›
SecureSymfony: Kris : Same here, but be sure to set the phpName
KRISWALLSMITH: in this schema the class phpName is myGuardUser, the table name if my_guard_users
i’m using the new schema syntax introduced in symfony 1.1
annis: cool, looks like “sf cc” can be left out starting with 1.2 when building the model?
mosez: 17:41 [SecureSymfony(] Next comment like this and will kick you out! < you are so cute!
KRISWALLSMITH: moving on… you should see propel model classes in the plugin now
JPhilip: I get: You must create a schema.yml or schema.xml file, even though I have schema.yml in plugins/myPropelGuardPlugin/config
KRISWALLSMITH: these model classes, as they are now, cannot be extended in both the plugin and the project
only one or the other
to fix this, we need to add a class to the heirarchy
so BasemyGuardUser > myGuardUser becomes BasemyGuardUser > PluginmyGuardUser > myGuardUser
JPhilip: There is an empty schema.yml in /config
annis: Kris: Huh?
πŸ˜‰ What do we need to change where?
KRISWALLSMITH: mkdir plugins/myPropelGuardPlugin/lib/model/plugin
annis: k
KRISWALLSMITH: (this involves a few steps and is something i’d like to automate in the sfTaskExtraPlugin)
annis: very good
eyalbiber: Why the documentation all over the symfony project/plugins…. and so on is shit ?
EBSMobile: ok
i am getting somewhere
when I write $articles = ArticlePeer::doSelect($c);
EBSMobile: do i need to write that inside the ArticlePeer model?
annis: eyalbiber: because symfony is changing and evolving!
EBSMobile: assuming that i wrap that in a function
eyalbiber: πŸ˜€ , why it’s evolving before finishing document older versions ?
annis: EBSMobile: you know, it’s Plugin Dev Day… but: you can do that wherever you want
EBSMobile: annis: what do you mean?
FabianLange: eyalbiber: there is no problem with the decoumentation. And there is documentation for any release available
annis: EBSMobile: you can get at all your articles from anywhere in an action
KRISWALLSMITH: create a file plugins/myPropelGuardPlugin/lib/model/plugin/PluginmyGuardUser.php with the contents
jamiel: EBSMobile: The best place for that is in ArticlePeer yes
EBSMobile: annis: yeah, wanted that to look more DRY
eyalbiber: I’m trying to install simple plugin cms
KRISWALLSMITH: and edit myGuardUser.php so it reads
eyalbiber: it’s like someone build something just for himself the documentation is HELL!!!!!!!!
KRISWALLSMITH: now you can add custom logic to you plugin’s model class by editing PluginmyGuardUser.php
annis: I guess, you’re trying to install a sf1.0 plugin into a sf1.1 project
KRISWALLSMITH: and the project can add custom logic by creating a myGuardUser.php in its lib/
FabianLange: eyalbiber: true, some plugins have no good documentation or are of bad quality, this is why today is plugin day and we all will make better plugins in future
KRISWALLSMITH: is this making sense to everyone?
annis: hmm, OOP is really cool
KRISWALLSMITH: any questions about making a plugin model class customizable in the project?
jamiel: KRISWALLSMITH: So the plugin author shouldn’t use myGuardUser ?
Only PluginmyGuardUser ?
annis: I guess
KRISWALLSMITH: jamiel: correct
the myGuardUser.php file in the plugin should remain an empty class
jamiel: But why don’t the developers just extend myGuardUser themselves if they want to override it?
myCustomMyGuardUser extends myGuardUser
annis: But then why have myGuardUser.php around? If in the project there’s a class that inherits from PluginmyGuardUser then everything should be golden, right?
KRISWALLSMITH: jamiel: propel restrictions — myGuardUserPeer::doSelect() returns instances of myGuardUser
jamiel: Aha
annis: And what do we want the respective classes to return?
annis: if that’s too low-level to explain then just move on πŸ™‚
KRISWALLSMITH: annis: we include stub class so the project doesn’t have to unless it needs to be customized
annis: alright, thanks
KRISWALLSMITH: annis: i don’t understand your question — classes don’t return, methods return
KRISWALLSMITH: ok, if there are no more questions on this point i’d like to take a 15 minute break
annis: Kris: sorry, I know. What I meant was: What do we want doSelect return in the cases where there are these inheritance hierarchies?
jamiel: annis: This way it “just works” … and if you want to extend the propel classes in your project, you do so using myGuardUser extends PluginmyGuardUser .. and Propel will return your custom class
because it has the name propel expects
annis: ah, clear now, thanks
KRISWALLSMITH: let’s continue at 20 minutes after the hour
annis: what time is it on your side, guys? Mine shows 6:05pm πŸ™‚
Okay, see you in 15
jamiel: So – where are all those people who were promising to release their sfPHPUnit plugins last month?
jamiel: Using 3.3 Bootstrapping
lukaswoj: jamiel: good question
Is there any plugin which helps caching propel objects in memcache ?
ksn135: Hi folks! Another way to extend sfGuardUser class to suit your needs using new schema format introduced in 1.1 — (add 4 new custom fields)
EBSMobile: annis: is there a way to get only one column in a data set like doSelect($c);
jscheel: is there a way to tell a component to render a partial, instead of looking for a component template?
annis: EBSMobile: You can only do that if you hydrate your objects manually with doSelectRS()
hal: sorry, guys, but where is myGuardUser.php located?
annis: EBSMobile: That way you can get only one column… but nevertheless, it’s costly in performance
EBSMobile: annis: thanks, so if i keep the recorset how do i access it?
jamiel: hal : it gets generated in plugins/myPropelGuard/lib/model
EBSMobile: annis: I am getting an array back
annis: jscheel: I don’t know, maybe do $this->renderPartial(); in the compnonents.php?
JPhilip: OK, I finally built the model, I did not have myPropelGuardPlugin enabled in config class.
jscheel: annis: that’s what I thought, but the component class doesn’t define renderPartial, I think it’s defined in the action class
annis: JPhilip: Hmm, I didn’t do that… and it works.
EBSMobile: annis: this is what i am printing <?php echo UkPostCodesPeer::getAreaName(‘N11SJ’)?
annis: jscheel: then get at it via the sfContext singleton… you’ll have to figure out where that is πŸ™‚
jscheel: annis: ok, thanks
KRISWALLSMITH: hello again
annis: Kris: Can I have another minute? πŸ˜‰
how’s this format working for everyone?
jamiel: wb, kris … if you are going to cover it later then ignore this, but curious as to why an entire project stub gets created in test/fixtures
JPhilip: I have used only Doctrine so far, looks like the propel classes are very verbose
KRISWALLSMITH: jamiel: a plugin’s test shouldn’t be dependent on an external project
hal: could someone tell me what I have done wrong here…
KRISWALLSMITH: hal: those method need to be called from ProjectConfiguration::setup()
hal: KRISWALLSMITH, so do I replace initialize with setup?
annis: okay, I’m back
KRISWALLSMITH: no, you need to open ProjectConfiguration.class.php to enable plugins, not the plugin configuration
jamiel: KRISWALLSMITH: agreed, but then when is the stub project used? Because the sf_root_dir is still the main project dir
hal: KRISWALLSMITH, ah, thank you!
KRISWALLSMITH: jamiel: take a look at the plugin’s test/bootstrap/functional.php file
KRISWALLSMITH: it uses the embedded project’s ProjectConfiguration class
KRISWALLSMITH: also of note is the embedded project’s ProjectConfiguration class
it’s been customized to work inside the plugin
hal: now I have the error, InvalidArgumentException: The plugin “sfDoctrinePlugin” does not exist.
KRISWALLSMITH: hal: you don’t need to disable the doctrine plugin b/c it’s disabled by default
hal: KRISWALLSMITH, oops, ok, thanks
KRISWALLSMITH: ok… let’s take a look at creating plugin modules
annis: cool. I’m getting the impression there are not so many of us following around anymore, or am I mistaken?
KRISWALLSMITH: i’m not sure
who all’s with us?
jscheel: annis: ok, this is what I have, but it’s still trying to render with the component’s template:
JPhilip: I am
annis: me
ksn135: me
jamiel: yup, following
lukaswoj: me too
KRISWALLSMITH: alright – let’s create a module to handle login and logout
KRISWALLSMITH: ./symfony generate:plugin-module myPropelGuardPlugin myGuardAuth
JPhilip: OK
KRISWALLSMITH: you should see a new /modules folder in your plugin
JPhilip: Yes
annis: yes
KRISWALLSMITH: this task creates a module just like the one created by generate:module with a few exceptions
annis: there’s no templates folder
KRISWALLSMITH: annis: yes, that’s a bug with the pear package that needs to be fixed
annis: ah, okay
shall we create it now?
annis: k
KRISWALLSMITH: the module actions class should look like this:
JPhilip: Yes there is one from trunk
KRISWALLSMITH: this class extends BasemyGuardAuthActions rather than sfActions
this is the same technique we used on the model classes
all your plugin actions should be defined in BasemyGuardAuthActions
JPhilip: This was done in a lot of plugins, nice to see it standardized in a task
KRISWALLSMITH: updated to include stub action methods:
JPhilip: OK
KRISWALLSMITH: a general rule of thumb for plugin actions is to create many small methods
annis: so they can easily be overriden
bschussek: KRISWALLSMITH: just a short question – why is the $_SERVER[‘SYMFONY’] var required when I generate plugins with your sfTaskExtraPlugin?
can’t you just copy the location of symfony based on the ProjectConfiguration?
KRISWALLSMITH: possibly something like this —
bschussek: no b/c we need a customized ProjectConfiguration
annis: erm, Kris, what exactly did change between the last two pasties for the action methods?
quickdev: KRISWALLSMITH, btw…many ppls are following your disicussion without taking part, just for info πŸ™‚
annis: the url is the same
bschussek: KRISWALLSMITH: I didn’t mean to use the project configuration, but to use the _path_ written in the ProjectConfiguration instead of relying on $_SERVER[‘SYMFONY’]
another problem I see with this solution is that I cannot use multiple versions of symfony at once
KRISWALLSMITH: annis: yes, i’ve been updating the same pastie
annis: oh, I have to check
KRISWALLSMITH: bschussek: you’re suggesting we run a regex on that file?
JPhilip: bschusssek:
KRISWALLSMITH: does the structure of login methods here make sense to everyone?
bschussek: KRISWALLSMITH: either that, or maybe there’s a different solution (maybe using Reflection on symfony classes or stuff like that)
annis: Kris: it wasn’t updating in my browser, got it now. Makes sense.
JPhilip: Yes, similar to what was done in the 1.0 generators
bschussek: ah sorry, forget the stuff about Reflection πŸ™‚
KRISWALLSMITH: using this structure you can create some basic defaults and leave the more specialized code to the application developer
for instance, the application developer may want to handle login failures differently for ajax requests
annis: so he could override handeLoginFailure?
KRISWALLSMITH: annis: exactly
annis: Kris: We’re a little bit off of your original schedule. πŸ˜‰
But when I imagine having to pay much money for this expertise of yours… πŸ˜›
KRISWALLSMITH: well, this discussion falls under “Writing a customizable plugin”
KRISWALLSMITH: ok, so we’ve covered model classes and modules
KRISWALLSMITH: any questions on either of those?
JPhilip: Yes, can you make it clear where we put the default action code?
KRISWALLSMITH: JPhilip: in the modules’s lib/Base*Actions.class.php
jamiel: KRISWALLSMITH: At this point do default routes exists now as /myGuardUser/auth/login ? Or does some routing config need to happen
annis: What belongs then in the actions.class.php?
jamiel: annis: Nothing, like myGuardUser in the model .. its a stub to be extended in the project
Erm, my wording was bad there ..
its a stub to be used until it’s extended
KRISWALLSMITH: the plugin actions.class.php should be an empty class so it can be copied into the application and customized — same technique we used for model classes
annis: okay
KRISWALLSMITH: jamiel: yes, default routes include plugin modules
jamiel: although each module will need to be enabled in the project or application’s settings.yml
jamiel: k, thanks
JPhilip: I am rather new to PHP, so it seems a little strange that implementation code goes in an abstract class
annis: hmm, you’re right… I know that C# doesn’t allow it.
Kris, PHP does?
FabianLange: yes, same as java. abstract classes are templates that already contain code but need to be extended by a class that provides remaining code
the ones that do not contain implementation are called interfaces
jamiel: Which is exactly what is happening in this case ….
So seems fine to me
KRISWALLSMITH: let’s take a look at plugins/myPropelGuardPlugin/test/functional/myGuardAuthActionsTest.php
KRISWALLSMITH: i’ve added a few lines to the generated file:
KRISWALLSMITH: anyone know how to fix this test?
jamiel: KRISWALLSMITH: Why don’t you generate that second line for us automagically with generate-module? πŸ˜‰
KRISWALLSMITH: jamiel: i agree
any ideas what needs to be fixed in the action for the test to pass?
jamiel: KRISWALLSMITH: we need a template
KRISWALLSMITH: jamiel: yep
add a logicSuccess.php template and the test should pass
annis: logicSuccess? loginSuccess
KRISWALLSMITH: actually, i take that back — looks like the module needs to be enabled in the embedded project application’s settings.yml
annis: yes, loginSuccess.php
jamiel: KRISWALLSMITH: again, generate-module could have done that for us couldn’t it?
selam: hi all
annis: but there’s no frontend app with an settings.yml
KRISWALLSMITH: jamiel: yes, there are a few bugs here
annis: or do you mean to create one the plugin config dir?
jamiel: annis: in plugins/myGuardUser/test/fixtures/project/
KRISWALLSMITH: paste this into your plugins/myPropelGuardPlugin/test/fixtures/project/apps/frontend/config/settings.yml
KRISWALLSMITH: *now* the test should pass — sorry about that
chrisk89: a little question about custom tasks in a plugin and application configuration, is it recommended/forbidden that tasks modify configuration files? if you want it can be discussed later
KRISWALLSMITH: chrisk89: there are some tasks that do (ie configure:*) but it must be done w/ care
annis: no success
jamiel: KRISWALLSMITH: getting unknown strategy 1
annis: even after clearing the cache of the embedded project
KRISWALLSMITH: yeah, that’s another bug, but the pastie has that fixed
jamiel: tried turning off escaping_strategy in that config you gave us but no joy
chrisk89: KRISWALLSMITH: thx
woss: hello
woss: can anybody tell me what is the best way to create form with 2+ uploads
KRISWALLSMITH: jamiel: what do you see now?
woss: fields
jamiel: InvalidArgumentException: Unknown strategy 1. This is using the pastie config
TjiefTjaf: woss: maybe some kind of AJAX/iFrame technique
woss: I heard for swfupload?
TjiefTjaf: Class ‘sfGuardSecurityUser’ not found
Heil sfAutoloader
dream0r: woss:
FabianLange: woss:
jamiel: Same error kris :S hmm
annis: erm, I just checked, the embedded project doesn’t regenerate the module.yml compilation…
it’s missing in the config folder
KRISWALLSMITH: you may need to clear the cache for the test project
annis: how do I clear the cache of the embedded project?
KRISWALLSMITH: annis: this should be handled by the bootstrap script, but for now you can run this…
./plugins/myPropelGuardPlugin/test/fixtures/project/symfony cc
annis: Kris: my bash just tells me, Permission denied on the symfony script
sudo… no luck
jamiel: do php plugins/my..
instead of ./
unless u +x it
Clearing cache hasn’t helped, maybe just move on Kris … look into it later
annis: yeah, just move on, it’s now telling me, it can’t find the AutoLoaderWhatEver…
KRISWALLSMITH: annis: try php plugins/myPropelGuardPlugin/test/fixtures/project/symfony cc
annis: no luck there, same error
JPhilip: I give up on the function test for now, I just get too many errors
jamiel: Oh wait, i got it
annis: Huh? πŸ˜‰
KRISWALLSMITH: there are some bugs in the generated code that are complicating things
woss: thanks to FabianLange and dream0r
KRISWALLSMITH: i will address these for the 0.0.2 release πŸ™‚
annis: no worries, it’s still alpha… but we could work with it pretty much, I wouldn’t call it 0.0.1-alpha
jamiel: Mine passes with that pastie sorry kris πŸ™‚ .. I was sticking in config/settings.yml instead of apps/frontend/config/
annis: mine passes now too
KRISWALLSMITH: let’s look at the plugin:package task, take another break, then get into the 3rd session “Ad hoc coding sprints on new and existing plugins”
annis: cool
i have 30min left to go to the supermarket before it’s closing πŸ˜€
sorry, off-topic
KRISWALLSMITH: so let’s pretend we’re ready to release myPropelGuardPlugin
go ahead and run ./symfony plugin:package myPropelGuardPlugin
you should see some interactive prompts
annis: yep
KRISWALLSMITH: go ahead and complete the wizard
jamiel: Ahh, sexy
ringhio`: hi!
KRISWALLSMITH: this uses the new sfTask::ask() methods
jamiel: KRISWALLSMITH: Is there a corellation between our plugin version number and symfony version number?
KRISWALLSMITH: jamiel: no, your plugin version number is up to you
JPhilip: Cannot package, errors in package file
annis: use a number like 0.0.1 as the version number
that had me too
run the same again, it will only ask you what’s missing or wrong
pretty sexy, I’ll have to admin
KRISWALLSMITH: right — some of those values are added to the xml template
if you get an error in the package file you should see a package.xml.error file
take a look at that
or run pear package-validate…
cd plugins/myPropelGuardPlugin
pear package-validate
you may need to mv package.xml.error package.xml before running package-validate
but that command should show you more information about what’s wrong
annis: maybe print out the package.xml.error?
And restart the process? So you don’t have to run the command twice?
hal: KRISWALLSMITH, although I caught up with your tutorial, I then got a phonecall and now I unfortunately have to go out. I can follow the tutorial tomorrow by using the log at but can you publish all the code somewhere later, so that we can access it, please?
annis: Can one restart the task from within the task?
KRISWALLSMITH: hal: sounds good
jamiel: So what have we got here Kris? Our package all zipped up and ready to go and starting point for a package.xml that we need to edit?
KRISWALLSMITH: annis: you can abort the task with ctrl-z
i need to step away for about 15 minutes. let’s take a break until the top of the hour.
hal: kriswallsmithBRB, thank you. And thank you for your hard work today. Can I suggest that when you post to a pastebin, to make sure it is a permanent pastebin, and to use different posts each time, so that we can always access each code-change as we follow through the tutorial at a later date?
annis: Kris: no, I mean, when there are errors, just print out the package.xml.error and restart the task *automatically* πŸ™‚
hal: kriswallsmithBRB, my above suggestion is for future seminars like this one.
good bye all
SecureSymfony: There will be other discussions today!
Kris : Hal have a good comment; exactly what I wanted to say, especially because we log the chatroom
hal: SecureSymfony, thanks a lot – bye now!
SecureSymfony: Will there be some localize SymfonyPluginCamps
EBSMobile: where can i see the SQL statements log ?
zadkiel1: Hi, sorry for my english, I test the new admin generator in symfony 1.2,unfortunaly when i go to the URL like : http://localhost/cms/web/backend_dev.php/categories
i’ve this php error :
Fatal error: Class ‘DemoCategoryFormFilter’ not found in F:\wamp\www\cms\cache\backend\dev\modules\autoCategory\lib\BaseCategoryGeneratorConfiguration.class.php on line 204 .
Someone have an idea ? 😦
SecureSymfony: zadkiel : look like you have a problem with your cache
zadkiel1: i have clear the cache
EBSMobile: I cannot see any sql execution in my log files, how can i make that work?
SecureSymfony: EBSMobile: symfony log?
EBSMobile: SecureSymfony: my application log
SecureSymfony: maybe it’s somewhere else?
SecureSymfony: EBSMobile : are you using the index.php or the appsname_dev.php?
EBSMobile: SecureSymfony: appsname_dev
SecureSymfony: EBSMobile: You need debuging
EBSMobile: xdebug?
SecureSymfony: EBSMobile : No
EBSMobile: SecureSymfony: I have web_debug: on
SecureSymfony: EBSMobile : Propel (but xdebug never hurt)
EBSMobile: SecureSymfony: I am on Osx πŸ™‚
SecureSymfony: So?
EBSMobile: and MAMP
SecureSymfony: Ah!
EBSMobile: πŸ™‚
what do you mean by propel/
I am on version 1.2 by the way
if that make any difference
SecureSymfony: do you mean properl.ini
KRISWALLSMITH: hal_away: i’ll try to recreate each paste and remove general discussion for the published log of today
annis: kris is back πŸ™‚
KRISWALLSMITH: so this last session is a bit more free-form
annis: Kris, before we start
KRISWALLSMITH: annis: yes?
annis: As I already said earlier (was at the beginning) and because we just did a sfGuard-style plugin
the thing is: currently there’s no way to explicitly remove a permission
either on the user or the group
I don’t know, maybe we could enhance that plugin?
but that might be too big
just a thought
jamiel: moving on.. πŸ˜›
annis: that’s by far the only thing missing from user/group management in sfGuardPlugin
yeah, move on
KRISWALLSMITH: well, this is a more freeform session
jamiel: meaning?
KRISWALLSMITH: how many are here for the plugin developers day now?
annis: me
KRISWALLSMITH: (no need to be shy)
FabianLange: freeform means that kris drinks cofee while everbody asks questions
phuson: anyone knows why after I checkout the plugin into the plugins folder, running ./symfony generate:plugin gives me “Task “generate:plugin” is not defined.”
annis: πŸ˜€
FabianLange: i am here because of that event as well
jamiel: Heh – I’m pretty sure most people are just catching up every 15-20 mins
KRISWALLSMITH: phuson: sounds like you haven’t enabled the plugin in ProjectConfiguration
phuson: ah
SecureSymfony: EBSMobile: Sorry I don’t understand why
JPhilip: here, I had an error in package content generation with <?xml version=”1.0″?> added before the content.
jamiel: KRISWALLSMITH: Still sitting with a package.xml template … and a zipped up project … how do we wrap that up to let the world know about our new awesome plugin?
phuson: KRISWALLSMITH: it’s been a while since I mess around with plugins, let me look at the API docs for that
EBSMobile: SecureSymfony: not sure, just cannot see any sql statements on th log file
KRISWALLSMITH: jamiel: now that you have the .tgz package you just need to upload it to
SecureSymfony: me
jamiel: But my package.xml is still an incomplete template it looks like
Don’t all the <files> need to be in there?
KRISWALLSMITH: jamiel: delete the package.xml and run plugin:package again
lukaswoj: Is there any plugin which automates caching (for example: with memcached) of selected model objects ? If no – I could try to develope such plugin
jamiel: I just get a package.xml.tmpl
KRISWALLSMITH: jamiel: good — the task uses that template to create a package.xml, which it then deletes after the package.tgz is created
JPhilip: if I remove <?xml version=”1.0″?> from content and build with pear, it works
KRISWALLSMITH: if there’s a package.xml file the task just uses that w/o asking any questions
JPhilip: pear doesn’t like the xml declaration? really?
JPhilip: Not on my setup (windows)
KRISWALLSMITH: interesting…
SecureSymfony: JPhilip : Your PHP is set to accept small tag… VERY BAD!
JPhilip: What is that?
mirthlab: hello from GMT-10 πŸ™‚
KRISWALLSMITH: good morning mirthlab
SecureSymfony: in your php.ini it accept <? instead of <?php only
mirthlab: KRISWALLSMITH: mornin’ πŸ™‚
annis: Hey, it’s 8:17pm!!! πŸ˜€
FabianLange: it is called “short tags”
mirthlab: ha… it’s 9:17 AM here πŸ˜‰
SecureSymfony: JPhilip : So you have an error with the XML
FabianLange: Your right! My bad!
KRISWALLSMITH: so, shall we decide upon a plugin to write/upgrade together? anyone want to take the lead here?
JPhilip: I have asp_tags = Off in php.ini
KRISWALLSMITH: welcome skoop!
mirthlab: KRISWALLSMITH: i’m in… any ideas?
hi skoop
annis: I’m also in, but not so much as a lead
SecureSymfony: JPhilip : short_open_tag = Off
Henrik|away: KRISWALLSMITH: hmm it should be something that uses tasks
jamiel: KRISWALLSMITH: Why dont we upgrade sfFeed2Plugin ? It’s pretty basic
EBSMobile: anyone? help? no SQL in log files?
annis: jamiel: sounds cool
Henrik|away: an idea of mine
skoop: hey all. how’s the PDD going?
Henrik|away: or how about the DbFinder πŸ™‚
theres no release for 1.2
skoop: whats with sfFeed2Plugin?
JPhilip: short_open_tag = Off is there
skoop: fabpot / KRISWALLSMITH: the BugHuntDay was a great success, so I’m looking forward to the symfony edition πŸ˜‰
mirthlab: skoop: recommendations for a PDD project
skoop: Henrik|away: I think sfFeed2Plugin isn’t even fully done for 1.1 yet
skoop: KRISWALLSMITH: PDD: Plugin Developer Dag
mirthlab: KRISWALLSMITH: plugin developers day?
KRISWALLSMITH: oh, of course.
mirthlab: at least… that’s what i guess it meant πŸ™‚
KRISWALLSMITH: sorry, this is me on two hours of sleep…
mirthlab: guessed*
annis: sfFeed2Plugin sounds good, anyone in?
SecureSymfony: I’m at a conference at the same time…
skoop: feel free to do the sfFeed2Plugin, but I have a nearly-done addition to the original plugin based on the ticket from Michael Nolan that I still need tocommit to it
BoukeH: Your configuration accepts besides <?php also <? as start tag (asp-style) which is considered a bad thing by some
mirthlab: KRISWALLSMITH: oh yeah, nice work on the sfTaskExtraPlugin though πŸ™‚ worth the lack of sleep
jamiel: Lets just do an easy one and get sfPHPUnitPlugin out the way πŸ˜›
BoukeH: wo mistake, was a reply to some question 7 minutes ago πŸ˜›
KRISWALLSMITH: let’s not work on sfFeed2Plugin if skoop has some pending commits
skoop: oh no, please do
it’s an addition
isleshocky77: Seeing this is plugin day, I think this is a gret time and place to ask this question. How does everyone handle making their package.xml file?
Henrik|away: isleshocky77: look at the new task plugin πŸ™‚
KRISWALLSMITH: isleshocky77: take a look at the plugin:package task in sfTaskExtraPlugin πŸ™‚
jamiel: isleshocky77: there is a new plugin:package task in sfTaskExtra
skoop: the only thing that may be a problem is the fact that the sfFeed2Plugin repository doesn’t have trunk/branches yet
KRISWALLSMITH: it’s brand spankin’ new
skoop: but I can easily change that
mirthlab: isleshocky77:
KRISWALLSMITH: but requires symfony 1.2
isleshocky77: haha.. ok. So my second point I was typing is a yes “Is what I’m doing a waste of time?” I was basically writing that plugin last night and as we speak.
Henrik|away: how about a paypal plugin
mirthlab: Henrik|away: oh please no
Henrik|away: πŸ˜›
mirthlab: what about a twitter plugin πŸ˜‰
Henrik|away: heh yeah
skoop: so, anyone willing to work on sfFeed2Plugin ? I’ll change the svn repository to support branches in that case
Henrik|away: that could be cool, a full api to interact with twitter
annis: please do
skoop: please do
Henrik|away: +1 for twitter plugin πŸ˜›
mirthlab: oh, looks like there’s a twitter client plugin
skoop: twitter plugin?
mirthlab: who knew?
Henrik|away: ahh damm :/
could have been fun
skoop: why the hell? there is twitter.class.php which is a single class that offers most functionality
jamiel: sfPhpDocumentor plugin needs a 1.2upgrade
skoop: no need to make a plugin out of that if you ask me πŸ˜‰
mirthlab: oh wait… it’s a twitter client plugin
skoop: annis: ok, let me look into that then
jamiel: But it is just one task πŸ˜›
FabianLange: skoop: it is plugin day.. you know πŸ™‚
SecureSymfony: Yes, but the twitter API change every week!
mirthlab: sfBrowser extention
you guys all on twitter? we should exchange names πŸ™‚
Henrik|away: what about some kind of openid thing for sfGuard ?
mirthlab: yeah kinda its on and off :
skoop: mirthlab: I’m skoop on twitter (surprise!)
mirthlab: heh, yeah… know what you mean
skoop: yeah, i think i’m already following you, haha
mirthlab: so have we decided? sfFeed2Plugin it is?
i think KRISWALLSMITH should just make a final decision πŸ™‚
Henrik|away: whos in for openid for sfGuard ? πŸ™‚
KRISWALLSMITH: i like the openid idea
jamiel: OpenId for sfGuard sounds cool
KRISWALLSMITH: can we leverage Zend’s open id classes?
SecureSymfony: Henrik : Too long to do… There is already 3 Plugin for it, and 2 with Zend!
FabianLange: there is a zend openid for sfguard plugin πŸ™‚
annis: Anyone with me on sfFeed2?
skoop: KRISWALLSMITH: perhaps stupid question: for plugins, do we put the versions for the different symfony versions into branches like branches/1.0 branches/1.1 and branches/1.2 ?
Henrik|away: yeah but its incomplete
SecureSymfony: sfFeed2 seem good, and more simple!
Yes, both of them!
FabianLange: skoop: ideally yes, but not all plugin authors did it like that
Henrik|away: KRISWALLSMITH: sure i guess they are pluggable
skoop: FabianLange: well, I’m going to alter the sfFeed2Plugin repo for this specific purpose πŸ˜‰
FabianLange: then please do so
KRISWALLSMITH: skoop: most plugins use branches/{sf_version}
skoop: ok
KRISWALLSMITH: but it’s up to the plugin dev to organized his or her repository
Henrik|away: KRISWALLSMITH: hmm guess openid should be a part of sfGuard and not an extra plugin so mayb too steep for now :/
KRISWALLSMITH: FabianLange: where is the zend open id for sfguardplugin?
SecureSymfony: It’s a new one
KRISWALLSMITH: i think group think is getting the best of us here… let’s just get into sfFeed2Plugin
mirthlab: KRISWALLSMITH: i agree! let’s just make a decision
KRISWALLSMITH: skoop: can you take a lead here?
skoop: KRISWALLSMITH: sure, what you want me to do? just help people with sfFeed2?
KRISWALLSMITH: this is the practicum part of the day
BoukeH: okey I’ll pay attention now since the discussed plugin, sfZendOpenIdPlugin, is the one I’m lead on πŸ™‚
KRISWALLSMITH: so folks could make edits to the plugin and send you patches for approval?
hi BoukeH
KRISWALLSMITH: i haven’t looked at sfZendOpenIdPlugin yet
BoukeH: it’s very basic at this moment, only authentication (sfZendOpenIdAuth) and administration of identities is supported as of yet
KRISWALLSMITH: BoukeH: can you share any challenges you faced writing this?
skoop: ok, I have made the changes to the sfFeed2Plugin repo
I’ll copy the 1.0 version to the 1.2 branch
KRISWALLSMITH: do people have access to the repo, or will they supply patches?
sorry, I’m just in and haven’t really been followeing PDD as I was in BHD
KRISWALLSMITH: skoop: no one has commit access
who’s still with us? who wants to work w/ stefan (skoop)?
annis: me
JPhilip: me
Henrik|away: im on kinda πŸ˜› (catching up on work stuff at the same time) but there none the less
mirthlab: me
i have commit access
FabianLange: me, but i am on 1.2 tickets πŸ™‚
BoukeH: It was my first plugin so I had to find everything out; particular challenges were the package.xml file for PEAR and integration of the Zend Framework
Henrik|away: why not merge the repo to git and everyone who wanna work on it can commit
FabianLange: so in case anyone has any patches for 1.2 besides plugins feel free to pm me
Henrik|away: and at the end well split some review parts up _
mirthlab: Henrik|away: that’s a little out of the scope for today πŸ˜‰
Henrik|away: πŸ™‚
sry πŸ˜›
mirthlab: haha
skoop: annis, JPhilip , mirthlab: ok, so from what I understood you want to migrate sfFeed2 to the 1.2 structure?
annis: seems like it
Marijn: hello
Henrik|away: but hmm
JPhilip: ok
Marijn: How was the plugin sprint?
Henrik|away: the tasks needs to be split up into tickets or something so peps dosent work on the same thing
annis: Can we use the sandbox 1.2 from before for it? I kinda stumped how we are going to work together
Henrik|away: Marijn: still doing it
Marijn: Nice
KRISWALLSMITH: annis: that’s why i’m delegating πŸ™‚
annis: Kris: fine, thx
skoop: annis: I wasn’t in before so I don’t know exactly what the 1.2 sandbox was, but it sounds like you could do it
Henrik|away: well we need some kind of project management ticket stuff
skoop: the sandbox = clean 1.2 install
skoop: Henrik|away: I agree
ah, in that case annis, you can use the sandbox to work on the sfFeed2Plugin
annis: skoop: We first need to know what’s *not* working in the plugin now
Henrik|away: KRISWALLSMITH: assembla account with temp ticket trac ?
annis: skoop: So, I’ll just checkout the 1.0 branch to my sandbox?
KRISWALLSMITH: Henrik|away: sorry, i’m english only…
Henrik|away: haha πŸ™‚ πŸ™‚
mirthlab: the way i’ve worked on plugins before…. simple link the plugin to the plugins directory via svn:externals
skoop: annis: wait just a minute, and you can checkout the 1.2 branch instead
Henrik|away: so we wont cludder the symf trac
FabianLange: skoop, did you intend the svn copy that way?
Marijn: KRISWALLSMITH: Ok, something occurred to me the other day. I was thinking about naming conventions for plugin classes and I think that when it comes to action classes we should stick to the Plugin prefix there as well in favor of the Base prefix
KRISWALLSMITH: why not just create trac tickets for sfFeed2Plugin?
FabianLange: ah you didnt πŸ™‚
skoop: FabianLange: already fixing it πŸ˜‰
Henrik|away: KRISWALLSMITH: hmm sure if its not gonna be confusing for people πŸ˜›
Marijn: wow, just read the blog post about sfTaskExtraPlugin => NICE πŸ˜€
skoop: annis: ok, the 1.0 code is now available in the 1.2 branch, so you can check out the 1.2 branch of sfFeed2Plugin
KRISWALLSMITH: Marijn: thanks
FabianLange: #3959 could be fixed πŸ™‚
skoop: FabianLange: my fault for working directly in the repo with my copies. fixed it in a local checkout instead πŸ˜‰
Marijn: thanks for my first comment or the second. I just started to see the advantage of developing certain logic in plugins and found myself in dire need of such a task πŸ™‚
FabianLange: yeah for directory copy and merge i prefer a gui over the cli πŸ™‚
jamiel: svn checkout plugins/sfFeed2Plugin
Pests: How do I use a projects symfony model classes outside of my symfony dir?
JPhilip: Got sfFeed2Plugin branch 1.2 checked out
annis: doing the checkout now… done
jamiel: How about we start by getting the tests failing in a way we expect … rather than throwing errors
then we can make them pass one by one
skoop: FabianLange: ticket 3959 is also related to this same thing: there is no sf1.1 package for the plugin yet
FabianLange: i know
thats why i was refering to this
skoop: annis, JPhilip , mirthlab: perhaps you guys could work on both an sf1.1 and an sf1.2 version?
bschussek: Klemens and I just implemented some new plugin testing goodies. We’ll propose them to Fabien, maybe we will get them into the core
Henrik|away: one thing is that 1.2 supports multiple mime types so the asXml method should be cleaned up
annis: jamiel: I’d do it the other way around first
bschussek: symfony test:all –plugin=myCustomPlugin and such stuff πŸ˜‰
the documentation for it is just being written by Klemens
annis: jamiel: create a new plugin with the new TaskExtraPlugin and integrate back from the original sfFeed2Plugin
KRISWALLSMITH: bschussek: yes, either the core or the task plugin
annis: jamiel: b/c the prove.php has changed since then, everything should be different now
bschussek: kris: I think this as well as the generate:plugin task definitely belongs into the core, since symfony officially supports plugins
Henrik|away: annis: i second that
but is there a lead on this so people arent gonna do all kind of things
KRISWALLSMITH: bschussek: fabpot has told me tasks geared toward plugin developers should go in the task extra plugin.
bschussek: which is maintained by the core team
bschussek: KRISWALLSMITH: ah, that’s interesting
annis: that’s kinda hard to do Herik, b/c the feed plugin isn’t working yet, we can’t just add features, we’ll have to rewrite pretty much
He”n”rik, sry πŸ™‚
How about gathering ppl for the same plugin in another room?
bschussek: KRISWALLSMITH: on the other hand, we made only small enhancements to the core test tasks, and I think writing separate tasks for this functionality would be way too complicated (for both devs and users)
Pests: How do I use a projects symfony model classes outside of my symfony dir?
KRISWALLSMITH: bschussek: can you use the command.* events?
bschussek: just think of having to use different test:all and plugin-test:all tasks
isleshocky77: ok, I’m back. Had to grab some food. For anyone who said that the taskPlugin is only for 1.2+ I made a small raw php only script which handles package.xml files pretty easily I don’t know if I should post it somewhere.
bschussek: KRISWALLSMITH: not really. Klemens will release the documentation for our changes in ~5 minutes, I suggest both you and Fabien look at it and tell us what you think about it
KRISWALLSMITH: bschussek: sounds good
Henrik|away: not to discreminate anyone but damm i am tired of swedish :/
JPhilip: One more hour, are we going to learn how to transform helpers into widget classes?
skoop: KRISWALLSMITH: do I need to be the lead on a plugin to change the installation instructions on /plugins?
KRISWALLSMITH: skoop: under which tab?
skoop: Under Installation
KRISWALLSMITH: JPhilip: i’m not sure i understand what you’re asking
Henrik|away: skoop: you cant
its generate by the packages availible
JPhilip: Old plugins use helper functions, now we have widgets for the same functionality
skoop: Henrik|away: ah ok
KRISWALLSMITH: JPhilip: you’re referring to form helpers and sfWidgetForm classes?
Pests: How do I use a projects symfony model classes outside of my symfony dir?
klemens_u: You can find the documentation of Bernhard’s any my proposal here:
It describes the enhancement for ‘symfony test:all’ etc for plugins
JPhilip: I mean custom helper functions like in my plugin sfDoctrineTree plugin: get_doctrine_tree($model, $field, $root = 0, $options = array()) should now be a widget
EBSMobile: No results guys
no SQL statements in my applications log!
KRISWALLSMITH: JPhilip: why is that?
JPhilip: I guess you can still use the helper functions, but widgets seem to integrate into the new form framework
isleshocky77: Anyone know where this room is being logged to? I have in my bookmarks that it was here:
bschussek: KRISWALLSMITH: if you have any feedback on our proposal, just write us here or add your comments on the wiki page
BoukeH: everyone have fun, I got to go
Henrik|away: a bit ot shouldnt JSON content type be text/x-json ?
KRISWALLSMITH: bschussek: now i see it
annis: Henrik|away: that’s IE MIME-types at work… πŸ˜€
Henrik|away: okay πŸ˜›
becuase safari just auto downloads application/json files
annis: it should be text/json then
Henrik|away: ty
fruit: q: does are avaiable any where #symfony channel logs?
SecureSymfony: fruit : we will have a transcription
_W_: &topic
SecureSymfony: I got to go!
_W_: it doesn’t say in the topic where the logs are available :/
SecureSymfony: Hum, normal, we need to get them out there…. It will be on
KRISWALLSMITH: have PDD folks signed off?
Henrik|away: You must pass a “class” attribute for a TinyMCE widget (message[body]).
KRISWALLSMITH: dunno im still here on the sideline πŸ˜›
klemens_u: me too πŸ™‚
KRISWALLSMITH: ok, let’s wrap up.
ringhio`: KRISWALLSMITH: do you will post a complete log of this PDD somewhere?
KRISWALLSMITH: do you guys think this is a good format for this sort of thing?
martialmind: doctrine:build-filters or propel:build-filters
KRISWALLSMITH: would you like to see this type of event happen more often?
ringhio`: of course!
klemens_u: KRISWALLSMITH: good questions. in general absolutely yes!
KRISWALLSMITH: i’m very interested in growing the plugin community
klemens_u: perhaps more focused – more specific on one topic
and a ‘prepare this and that’ list perhaps (sf1.2 installation etc)
KRISWALLSMITH: another idea i’ve had is to setup an established “peer review” process that a plugin dev can submit their work to
ringhio`: maybe it could be shorter and more focused
KRISWALLSMITH: to add a level of legitimacy
KRISWALLSMITH: ok, shorter and more focused. fair enough.
klemens_u: KRISWALLSMITH: +1 for the peer review
klemens_u: It’s would be also a good way to learn from each other
JPhilip: Maybe ask people to prepare specific questions/problems to solve from their plugins
annis: yeah, that would be good
KRISWALLSMITH: JPhilip: i’m not following you
ringhio`: if you want to repeat frequently
annis: anyone here still interested to help skoop and myself with sfFeed2?
ringhio`: annis: sfFeed2Plugin of Zaninotto?
JPhilip: Let plugin developers prepare and expose problems they have with their own plugins
ringhio`: i use it on are you looking for help to maintain?
skoop: ringhio`: previously of francois, yes
annis: ringhio: yes
skoop: ringhio`: we are looking for help right now to port it to sf1.1 / sf1.2
ringhio`: yes I know about his departed
annis: join us on #sfFeed2
JPhilip: I am not sure I understood the sf2Feed thing, I thought it was just an exercise we were doing
FabianLange: i really would like to see sffeed2 for 1.2 and could help, but i dont have anythin here on my mac yet
EBSMobile: annis: Is there a reference with regards to doSelect($c) ?
klemens_u: KRISWALLSMITH: a question for sfTaskExtraPlugin:
EBSMobile: annis: I am getting an array as a result but now sure how to extract the data from it?
klemens_u: how is the fixtures project created?
KRISWALLSMITH: klemens_u: it’s directly copied from the core
Henrik|away: KRISWALLSMITH: should have our own channel so normal sf question is filtered from the actually event
KRISWALLSMITH: Henrik|away: next time, yes
Henrik|away: #symfony-event or something
KRISWALLSMITH: Henrik|away: that’s exactly what i was thinking πŸ™‚
Henrik|away: great minds think alike ^^
klemens_u: KRISWALLSMITH: so it’s similar to ‘generate:project’?
KRISWALLSMITH: yes, although it doesn’t actually call the task
klemens_u: I see. thanks
KRISWALLSMITH: well, thank you to everyone who participated today
i’m glad we did this πŸ™‚
i’ll have a transcript available shortly — i’ll probably announce it on the blog
isleshocky77: KRISWALLSMITH: Is there a log somewhere?
JPhilip: Tanks
klemens_u: KRISWALLSMITH: Any feedback from your side on our ‘enhancment of the test tasks’ RFC?
isleshocky77: Is there a new way of running tests, such as all tests including symfony and plugins, just all plugins, etc. Or do we have do run php prove.php individually for each?
klemens_u: isleshocky: we proposed that today:
klemens_u: isleshocky. Is that what you have in mind?
KRISWALLSMITH: cheers, all
isleshocky77: klemens_u: Yep.
hal: OK, I am back for a moment. Can you tell me if the tutorial covered what some of us requested at the start? ie dependencies on another plugin?
klemens_u: hal: I’m afraid not.
hal: oh 😦
klemens_u: The basic questions took more time than expected.
klemens_u: But the idea is to repeat such events, with a more focused scope
hal: ok – this would be good subject matter for a blog post, tho
klemens_u: It seem so πŸ™‚
I’m using doctrine, it works there πŸ™‚
hal: klemens_u, the example I gave in the beginning was, if you develop a new plugin that relies on a user (say forum post, which must be owned by a user). So, if using sfGuard, the createdby_user field would be a FK to the sfGuardUser table. However, how could you create a plugin that relies on sfGuard if it exists, but still works if the user has his own user authentication system?
klemens_u: ok, that’s a different topic. I missunderstood.
hal: how would you easily replace one user auth system with another? How would you write both the new plugin and your own user auth system so you could unplug the dependency and replace it with another with little change in the config?
hal: kriswallsmithAFK, please would you read the suggestion that I have just made? This would be a very useful addition to the plugins info that you have provided in this tutorial


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: