Modify

Ticket #188 (assigned enhancement)

Opened 4 years ago

Last modified 8 months ago

Add namespaces to Phing

Reported by: hans Owned by: hans
Priority: major Milestone: 2.5.0
Component: phing-core Version: 2.3.0
Keywords: Cc: Mp@…

Description

As also expressed in #86, Phing needs namespaces! Thank you, PHP 5.3, for making this possible.

Attachments

Change History

comment:1 Changed 4 years ago by hans

  • Status changed from new to assigned
  • Type changed from defect to enhancement

comment:2 Changed 4 years ago by hans

(In [307]) Refs #188 - Adding work-in-progress (still-broken!) namespace support.

comment:3 Changed 4 years ago by hans

(In [307]) Refs #188 - Adding work-in-progress (still-broken!) namespace support.

comment:4 Changed 4 years ago by hans

First pass (a basic buildfile now works) committed in r307. More to follow, obviously, since anything but a very basic build file will almost certainly still produce PHP errors :)

comment:5 Changed 4 years ago by hans

(In [309]) References #188 -- adding phing::BuildException to all classes (not in root namespace).

comment:6 Changed 4 years ago by hans

(In [310]) Refs #188 - Added a bunch of "use phing::system::io::File;" lines

comment:7 Changed 4 years ago by hans

(In [310]) Refs #188 - Added a bunch of "use phing::system::io::File;" lines

comment:8 Changed 4 years ago by hans

(In [311]) Refs #188 - Moving some classes (File, BuildLogger, etc.)

comment:9 Changed 4 years ago by hans

(In [312]) Refs #188 - Updating phpunit & coverage tasks to work w/ new namespaces.

comment:10 Changed 4 years ago by cweiske@…

seems that php 5.3 does not get namespaces

comment:11 Changed 2 years ago by bender

Please don't make phing require php 5.3 features until 5.2 reaches end of life (or at least 5.3.x is the default php version for debian, ubuntu and redhat LTS releases).

I agree that support for namespaces is a great way to clean up a large and somewhat crufty php codebase, but making 5.3 a requirement for using the build system's functionality will be a major roadblock to adoption in many environments.

comment:12 Changed 2 years ago by mrook

Valid comments - we're not even close to determining a release plan for 3.0, so there's time ;)

comment:13 Changed 8 months ago by Christian Weiske <cweiske@…>

5.2 EOL was in July 2010, a year ago.

comment:14 Changed 8 months ago by mrook

  • Milestone changed from TBD to 2.5.0

comment:15 Changed 8 months ago by mp

I am still using 5.2 on legacy systems ;-)

From my experience on other (commercial) projects - what's the value added from having to touch the entire codebase to get namespace support?

I mean, besides getting a nice way of using an autoloader ;-)? Maybe this is out of scope for this bug, but I like the Symfony loader... :)

comment:16 Changed 8 months ago by mrook

Main reason: to really prevent naming clashes with other classes. Phing never used the Zend/PEAR naming conventions, so skipping that and proceeding on to namespaces seems like the logical step.

comment:17 follow-up: ↓ 19 Changed 8 months ago by Christian Weiske <cweiske@…>

When namespaces are introduced, please make Phing PSR-0 compatible.

 http://groups.google.com/group/php-standards/web/psr-0-final-proposal

comment:18 Changed 8 months ago by mp

  • Cc Mp@… added

comment:19 in reply to: ↑ 17 Changed 8 months ago by mrook

Replying to Christian Weiske <cweiske@…>:

When namespaces are introduced, please make Phing PSR-0 compatible.

 http://groups.google.com/group/php-standards/web/psr-0-final-proposal

For PSR-0, please see #650.

View

Add a comment

Modify Ticket

Action
as assigned
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.