[wp-trac] [WordPress Trac] #18546: Add index.php to wp-includes and wp-admin/includes

WordPress Trac noreply at wordpress.org
Tue Jun 16 06:59:41 UTC 2020


#18546: Add index.php to wp-includes and wp-admin/includes
-------------------------------------------------+-------------------------
 Reporter:  SergeyBiryukov                       |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.5
Component:  Bootstrap/Load                       |     Version:  3.2
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-patch needs-        |     Focuses:
  refresh                                        |
-------------------------------------------------+-------------------------

Comment (by whyisjake):

 It looks like it is 243 new files.

 Programatically add a file to every folder:

 {{{
 find src -type d -exec touch {}/index.php \;
 }}}

 I took all of the new files and then did this:

 {{{
 echo "<?php\n// Silence is golden.\n?>\n" >> path/to/index.php
 }}}

 And then `composer format` to ensure that we had the correct formatting
 for the diff.

 I agree that it would be great to ensure that we had a build process to
 ensure that we had something like this when new packages/folders are
 added.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/18546#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list