Make WordPress Core


Ignore:
Timestamp:
08/27/2016 09:15:01 AM (8 years ago)
Author:
wonderboymusic
Message:

Bootstrap: Autoload classes using a Composer-generated PHP 5.2-compatible Autoloader.

  • wp-admin and wp-includes are scanned for classes to autoload
  • Several 3rd-party and Ryan McCue-shaped libraries are excluded when the classmap is generated, see composer.json: autoload.exclude-from-classmap
  • wp-vendor/autoload_52.php is included at the top of wp-settings.php - no changes need to be made to unit tests to include the autoloader
  • An avalanche of require() and require_once() calls that loaded class files have been removed from the codebase.

The following files have been added to svn:ignore - they are not 5.2-compatible and fail during pre-commit:

  • src/wp-vendor/autoload.php
  • src/wp-vendor/composer/autoload_real.php
  • src/wp-vendor/composer/autoload_static.php
  • src/wp-vendor/composer/ClassLoader.php

We favor these files instead:

  • src/wp-vendor/autoload_52.php
  • src/wp-vendor/composer/autoload_real_52.php
  • src/wp-vendor/composer/ClassLoader52.php

When new PHP classes are added to the codebase, simply run composer install or composer update from the project root to update the autoloader.

The future is now.

See #36335.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-control.php

    r38307 r38399  
    599599
    600600}
    601 
    602 /** WP_Customize_Color_Control class */
    603 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-color-control.php' );
    604 
    605 /** WP_Customize_Media_Control class */
    606 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-media-control.php' );
    607 
    608 /** WP_Customize_Upload_Control class */
    609 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-upload-control.php' );
    610 
    611 /** WP_Customize_Image_Control class */
    612 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-image-control.php' );
    613 
    614 /** WP_Customize_Background_Image_Control class */
    615 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-background-image-control.php' );
    616 
    617 /** WP_Customize_Cropped_Image_Control class */
    618 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
    619 
    620 /** WP_Customize_Site_Icon_Control class */
    621 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' );
    622 
    623 /** WP_Customize_Header_Image_Control class */
    624 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' );
    625 
    626 /** WP_Customize_Theme_Control class */
    627 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php' );
    628 
    629 /** WP_Widget_Area_Customize_Control class */
    630 require_once( ABSPATH . WPINC . '/customize/class-wp-widget-area-customize-control.php' );
    631 
    632 /** WP_Widget_Form_Customize_Control class */
    633 require_once( ABSPATH . WPINC . '/customize/class-wp-widget-form-customize-control.php' );
    634 
    635 /** WP_Customize_Nav_Menu_Control class */
    636 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-control.php' );
    637 
    638 /** WP_Customize_Nav_Menu_Item_Control class */
    639 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-item-control.php' );
    640 
    641 /** WP_Customize_Nav_Menu_Location_Control class */
    642 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-location-control.php' );
    643 
    644 /** WP_Customize_Nav_Menu_Name_Control class */
    645 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-name-control.php' );
    646 
    647 /** WP_Customize_Nav_Menu_Auto_Add_Control class */
    648 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-auto-add-control.php' );
    649 
    650 /** WP_Customize_New_Menu_Control class */
    651 require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-control.php' );
Note: See TracChangeset for help on using the changeset viewer.