Commit Graph

27 Commits

Author SHA1 Message Date
hassan
7e84b1ee00
Fix path printing in ext_skel (#7387) 2021-08-19 09:43:32 +02:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
ZoDream
28afaef6fa Repair ext_skel.php to create the basic framework for a PHP extension
Copy the arginfo stubs file, and drop the %EXTNAME%_ to make things line up.

Closes GH-5289.
2020-03-23 09:25:06 +01:00
Nikita Popov
169805777c Merge branch 'PHP-7.4'
* PHP-7.4:
  Apply tidy formatting
2020-02-03 13:42:08 +01:00
Nikita Popov
58b17906f5 Apply tidy formatting
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Nikita Popov
29df9d13da Rename skeleton stub file
Add the .php suffix
2020-01-06 14:43:29 +01:00
Craig Duncan
a9e8cd2b6b Convert the example skeleton extension to use arginfo stubs 2019-11-18 11:41:24 +01:00
Christoph M. Becker
04d5086578 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update array access syntax deprecated
2019-10-17 23:40:30 +02:00
Alex Porto dos Santos
a6a2d167d8 Update array access syntax deprecated
Update array access syntax deprecated in line 175 and 204
Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 175
Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 204
2019-10-17 23:39:55 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Peter Kokot
f45b61b898 [ci skip] Migrate Coding standards docs to Markdown 2019-05-18 21:41:38 +02:00
Peter Kokot
44952cd9d4 Add extensions naming conventions to ext_skel.php
- first character is a letter
- followed by any number of letters, numbers, or underscores
- prefferred are lower case letters
2019-05-14 03:04:40 +02:00
Peter Kokot
a1b7bc0c81 Integrate README.EXT_SKEL to help option
- Sync help output using heredoc
- Add extension building instructions
- Building with phpize is preferred option. Mention also tests
- Refactor print_success()
2019-03-13 20:56:10 +01:00
Peter Kokot
c245898bfa Update and fix remaining year ranges (2019)
This patch follows previous license year ranges updates. With new
approach source code files now have simplified headers with license
information without year ranges.
2019-02-08 23:14:29 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Gabriel Caruso
f2b5ac7963
[ci skip] Fix typo 2018-07-29 13:48:35 -03:00
Hongbo
a76661a4a2 fix ext_skel continue
"continue" inside switch is ambiguous, should be "continue 2".
2018-07-18 20:49:12 +02:00
Peter Kokot
2788ab9fa6 Enhance the ext_skel.php script file
- File is now executable
- Shebang added on top
- Normal UTF-8 encoding instead of UTF-8 with BOM
- trailing whitespaces trimmed as a CS fix
- Closing PHP tag removed in favor of readability, avoiding possible
  issues with whitespaces, and to comply with current CS from the
  PHP ecosystem - PSRs etc.
2018-05-26 22:00:17 +02:00
Pedro Magalhães
230ef2d947
improve extension skeleton generator 2018-02-22 08:04:33 +01:00
Kalle Sommer Nielsen
2340f9a67d Fixed typo 2018-01-05 07:30:45 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Kalle Sommer Nielsen
216d711224 Fix ext_skel's help, the arguments passed are using a space, not an equal sign for values 2017-07-23 11:28:27 +02:00
Kalle Sommer Nielsen
f35f45906e Redesigned ext_skel to be written entirely in PHP with no dependencies, this means it will now run on Windows without Cygwin and other nonsense.
It no longer includes a way to generate XML documentation (the PHP documentation utilities already got tools for that in svn under phpdoc/doc-base) and it no longer support function stubs.

$ php ext_skel.php --help
php ext_skel.php --ext=<name> [--experimental] [--author=<name>]
                 [--dir=<path>] [--std] [--onlyunix]
                 [--onlywindows] [--help]

  --ext=<name>          The name of the extension defined as <name>
  --experimental        Passed if this extension is experimental, this creates
                        the EXPERIMENTAL file in the root of the extension
  --author=<name>       Your name, this is used if --header is passed and
                        for the CREDITS file
  --dir=<path>          Path to the directory for where extension should be
                        created. Defaults to the directory of where this script
                        lives
  --std                 If passed, the standard header and vim rules footer used

                        in extensions that is included in the core, will be used

  --onlyunix            Only generate configure scripts for Unix
  --onlywindows         Only generate configure scripts for Windows
  --help                This help

Example usage:
$ php ext_skel.php --ext test --std --experimental
$ php ext_skel.php --ext kalle --author "Kalle Sommer Nielsen"
$ php ext_skel.php --ext phpfi --dir "/home/kalle/dev/" --onlyunix
2017-07-23 10:36:35 +02:00
Frank M. Kromann
b079cc2af5 Rename script.
Add check for CLI version
2003-01-31 18:51:28 +00:00
Frank M. Kromann
941dc7260d Wrapper script to use ext_skel on Win32 2003-01-31 03:44:20 +00:00