-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source code migration to PHP 5.3 features #58
Comments
Could you open an issue to PHPExcel ? It's the reference for PHPOffice projects. Link : #40 (comment) |
Sure, but there is small problem with that. PHPExcel still currently supports PHP 5.2. :) It seems the topic is not actual for them. |
Yep but the version 1.7.9/1.8.0 is the last one to support this. The next version 2.0.0 will support from 5.3.0. |
There is still no answer from PHPExcel team. @Progi1984, I suggest starting to support PHP 5.3 features independently of the PHPExcel project. php.net announced 5.6 alpha version not so long ago. We can't wait anymore. We're losing time and opportunities. It's time to discuss PHP 5.5 support, but we are stuck with 5.3 still. :( What do you think? |
+1 for not waiting for PHPExcel. If both projects agree to fellow the PHP-FIG standards instead of the PHPExcel standard they would get more support from the community and they could move faster. |
@RomanSyroeshko || @gabrielbull : Would you take care of this issue (that I link to #77) ? |
@gabrielbull Could you point these pull requests to the develop branch, before ? |
Guys, do we have some exact dates for our milestones (0.7.1, 0.7.2, etc.)? I have already made some commitments, but I can't promise to do more, because I have no even preliminary schedule. :( |
@RomanSyroeshko : New tickets are reported to next milestones, except simple questions. |
So, we plan to release each version just when it ready (no time expectations), right? |
Affirmative. It's why i try to not load each milestone. |
OK. I'll take care of this issue, if @gabrielbull leaves something for me to the moment when I handle my earlier commitments. :) |
@RomanSyroeshko Do you plan to do in this milestone or in this next ? Thx for your engagement ;) |
I prefer in next, but will see how it goes. I saw that @gabrielbull has implemented something up on this subject. |
I just assign it to the milestone 0.7.2. And @MarkBaker has contacted me for the refactoring :
You can download the file there (https://drive.google.com/file/d/0B8Md-dZwYjloNFhiQnN1SGZqY0c5djdEYmM4a05yQW5CSl9F/edit?usp=sharing) And you can contact @MarkBaker if you need. |
@gabrielbull Your two pull requests are merged :) |
Guys, I went through the migration guide and came to a conclusion that in scope of this issue we have to complete only two tasks (see issue description). So, the problem is not so huge as it was. :) |
I agree. Let's migrate :) |
Is the fact of change in PHP 5.3 could not be the opportunity to evolve the core as implied @MarkBaker? |
Of cource it's a good moment to get maximum from the changes provided by @MarkBaker, but lets consider that as the next step. I would say lets consider that as the separate issue in scope of 0.7.2. |
@RomanSyroeshko Okay, I let you create the separate issue for gathering ideas. |
Me. It is standard to have the source files in Here are a few popular projects if you want to get some inspirations on PHP projects structures: |
@gabrielbull, all of them use PSR-0 autoloader (take a look at If we use long paths, there is no reason of using PSR-4. |
PSR-0 is part of PSR-4 so we are compliant with PSR-4. The reason for PSR-4 is not necessarily for small libraries like this one but for much larger projects that have many parts and needs more accommodations like frameworks or applications. I think the structure we currently have is an accepted standard and I'm fine with it. |
@ivanlanin, what do you think about that? |
If it still complies with PSR, I'll go with the shortest path. I can imagine a new user checking out PhpWord. It will be better if he/she can find our files faster. |
Yep. If a user downloads our sources packed in a ZIP-file, he already has |
Well, it's not confusing, it's a standard, meaning it is less confusing for people used to code PHP. Even the composer package uses this standard structure: https://github.com/composer/composer. If everyone starts inventing new project structures because with PSR-4 you can, that is not better for the community, that is worse. See, we could have all our source files into a directory name |
@gabrielbull, if everyone does the same what others do, we will always stay on the same place. Here is another post about PSR-4 and PSR-0: Battle of the Autoloaders: PSR-0 vs. PSR-4. So, if we use PSR-0 directory structure, we must use PSR-0 autoloading and do not confuse users with PSR-4 "compliance", because it's not true. If we claim that our code compliant with PSR-4, we must use appropriate directory structure. @Progi1984, what's your opinion on the topic? |
Personnally, when I want a library, I use composer so I don't look at the architecture of the library. Then, if we support PSR-0 & PSR-4, i am agree with @gabrielbull. |
@Progi1984, we can't support both. PSR-4 is designed to shorten paths. If we use long paths, it's not PSR-4, it's PSR-0.
And what happens when you want to modify that library? You will have to look at the architecture. |
I fail to see where PSR-0 is not compliant with PSR-4. Can you give us the points we are not complying with? |
Did I say so? |
Then, personally, I fail to see what is the rush for changing the project structure if it is compliant with all PSR-* and is using the standard in the industry. |
According to PSR-4 the structure should like |
Where does it says so? https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md |
But those are examples and do not include or exclude every possible scenarios, you have to read the specification and we must comply with every point there to be PSR-4 compliant, the bonus is that we are also PSR-0 compliant! |
Are you sure about Composer? Does it support both? |
Composer supports both. |
OK, let it be so. That means I understand PSR-0 and PSR-4 wrong, as Jordi Boggiano does. I'm comfortable with that. Nevermind. |
Well here is what I think. The current structure is fine for a release, we should not hold up the release because we are arguing over new standards that are not yet widely used. What we can do, is keep an open mind to this and continue to talk about it. I've talked to Jordi in the past, I will talk to him again about this, even though he is very busy. So what do you say we release the new version as is, and continue the discussion on this topic. If you agree, close this issue and lets open a new email discussion about it very soon. |
Guys, I've finished with cutting I will take several days off and will be passive. Need some rest. |
Rest you :) You have done a very good job :) |
As soon as minimal supported PHP version of PHPWord is 5.3 for now, it would be really cool to refactor source code and use new features (namespaces, for example).
Migration guide from PHP 5.2.x to PHP 5.3.x could be found here. Tasks to do:
@Progi1984, @gavroche, do we plan to do something like that?
The text was updated successfully, but these errors were encountered: