| 2013-03-27 |
| → stanlemon joined | 00:25 |
|
pmjones
| well hi there stanlemon | 00:33 |
|
| nice to see you :-) | 00:33 |
|
stanlemon
| hey pmjones - nice to see you as well | 00:33 |
| → harikt joined | 00:45 |
|
harikt
| Hey good day guys | 00:45 |
|
| Good day pmjones :) | 00:45 |
|
pmjones
| well hello there harikt :-) | 00:45 |
|
| nice to see you dude | 00:45 |
|
harikt
| I just saw your mail regarding the Package oriented autoloader . | 00:45 |
|
pmjones
| ah so? | 00:45 |
|
harikt
| wondering what is your intention making like that | 00:46 |
|
pmjones
| frankly, it was how the aura packages used to be set up ;-) | 00:46 |
|
harikt
| yes I recall it :) | 00:46 |
|
pmjones
| and it *does* reduce the number of directories/depth/hierarchy in packages | 00:46 |
|
| i realized that PSR-0 came out of "a single central include path" | 00:47 |
|
harikt
| But you already have the directories on top | 00:47 |
|
pmjones
| and since we don't have that any more with composer, it seemed to make sense to update the related ideas | 00:47 |
|
| "you already have directories on top" -- and? | 00:47 |
|
| dropping two off the bottom makes it a lot easier when looking at the packages in, e.g., a browser or a text editor | 00:47 |
|
harikt
| so the depth hierarchy will not reduce . | 00:48 |
|
pmjones
| it does reduce it, by two, when looking in (e.g.) src | 00:48 |
|
| and it gets rid of the repeated naming | 00:48 |
|
harikt
| So the remaining namespace will be having a directory itself as in PSR-0 ? | 00:48 |
|
pmjones
| vendor/package/src/Vendor/Package | 00:48 |
|
| yes | 00:49 |
|
| so for a class Vendor/Package/ClassName, it would be in (e.g.) vendor/package/src/ClassName | 00:49 |
|
| .php | 00:49 |
|
harikt
| I was thinking for Vendor\Package\Hello\World\ClassName => vendor/package/src/Hello/World/ClassName.php | 00:50 |
|
pmjones
| yes, that works under the proposed system | 00:51 |
|
harikt
| and may be I wonder whether we could add a single file many classes also to the proposed one. | 00:51 |
|
| Let me give you an example. | 00:51 |
|
| Here is the gist pmjones https://gist.github.com/harikt/5250686 | 00:56 |
|
pmjones
| not sure what you're trying to do there | 00:56 |
|
harikt
| We don't need to write so many classes for Exceptions | 00:58 |
|
| a single file helps. | 00:58 |
|
| normally the extended Exceptions doesn't have any code and is similar to require a single file. | 00:59 |
|
pmjones
| so your argument is that there should be a way to say "there are also lots of classes in this file here, load it if you don't find the class file elsewhere" ? | 00:59 |
|
harikt
| yes | 01:00 |
|
| pmjones thinks | 01:00 |
|
harikt
| see an example of the issue https://github.com/nette/nette/blob/master/Nette/common/exceptions.php | 01:00 |
|
pmjones
| in a way, that may defeat the purpose of autoloading | 01:00 |
|
| if you're going to have a file with a lot of classes in it, perhaps the thing to do is to compile all your classes into a single file and load just that | 01:00 |
|
| voila, no need to autoloading, just include the file | 01:00 |
|
harikt
| But I am not sure if there is nothing in the class, will that also make trouble ? | 01:01 |
|
| may be we want to make a benchmark. | 01:01 |
|
| :) | 01:01 |
|
pmjones
| benchmarking here would not show much | 01:02 |
|
harikt
| See the above one, you can see the classes has no methods nor properties | 01:02 |
|
pmjones
| in production, you'd have everything loaded into memory anyway | 01:02 |
|
| so the number of files would not be a factor | 01:02 |
|
harikt
| ok. | 01:03 |
|
| one more question for you. | 01:03 |
|
| In aura, how does the drop functionality of package work when you bring vendor/package/src/ClassName.php . You will move the src and tests to inside the vendor/package ? | 01:04 |
|
| I was asking about the github | 01:05 |
|
| github.com/auraphp/Aura.Package/aura/package/src , github.com/auraphp/Aura.Package/aura/package/tests ? | 01:05 |
|
pmjones
| the proposal specifically makes an allowance for PSR-0 packages, provided they have at least 2 namespace levels and no underscores in classes | 01:06 |
|
| you would addPackage('Aura\Sql', '/path/to/Aura.Sql/src/Aura/Sql') in that case | 01:06 |
|
| so the aura packages as they are would not have to change | 01:07 |
|
harikt
| no I was not asking about how you add . | 01:07 |
|
pmjones
| now, future releases (version 2 releases maybe?) could take advantage | 01:07 |
|
harikt
| ok I got it now. | 01:07 |
|
pmjones
| ah ok | 01:07 |
|
harikt
| and also I don't know whether composer will reduce this vendor/package name | 01:08 |
|
| so the composer still will be having vendor/aura/package/aura/package/src/ClassName.php also | 01:08 |
|
pmjones
| no, it would be vendor/aura/package/src/ClassName.php | 01:09 |
|
| as vs what we have now, which is vendor/aura/package/src/Aura/Package/ClassName.php | 01:09 |
|
harikt
| ok, may be there is some configuration to remove the aura/package on installation ? | 01:10 |
|
pmjones
| why? | 01:10 |
|
| it'd work both ways | 01:10 |
|
| all that would be needed is to point the autoloader to the right directory | 01:11 |
|
harikt
| For eg : as I mentioned github.com/auraphp/Aura.Sql/aura/sql/src/ files | 01:11 |
|
pmjones
| i addressed that above | 01:11 |
|
harikt
| aah ok. You are assuming all have the vendor / package | 01:11 |
|
| directory . | 01:11 |
|
pmjones
| correct | 01:11 |
|
harikt
| Thank you for clarifying . | 01:11 |
|
pmjones
| that's one of the rules listed :-) | 01:11 |
|
| sure thing | 01:12 |
|
harikt
| I guess you will get enough time to make this one pass ;) | 01:12 |
|
pmjones
| ha! | 01:13 |
|
| no, i'm not trying to "make it pass" | 01:13 |
|
| i'm testing the water, so to speak, to see if anyone else thinks it's useful | 01:13 |
|
harikt
| It is gone to fig :-) , we can see the thread going | 01:13 |
|
pmjones
| esp. given the reasons why we have PSR-0, and the idea that there's no more "main central directory" for source files | 01:13 |
| ← harikt left | 01:18 |
| ← pmjones left | 01:26 |
| → harikt joined | 01:30 |
|
harikt
| I typed something but was put from irc . | 01:31 |
|
| for the record I mentioned about | 01:32 |
|
| Previously ralph mentioned in a comment | 01:32 |
|
| The toplevel vendor/package name for tests makes the editors itellicence an issue . | 01:32 |
|
| For eg : when the tests/ClassTest.php also sharing the same namespace . | 01:32 |
|
| So he was using a Vendor/PackageTest as namespace . | 01:32 |
|
| Do you have any thoughts addressing the same . | 01:32 |
| ← harikt left | 01:33 |
| ← stanlemon left | 01:49 |
| → stanlemon joined | 01:56 |
| ← stanlemon left | 02:43 |
| → pmjones joined | 15:08 |
| agentile_ → agentile | 18:47 |