Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
b01413a
先写php部分
minbaby Nov 13, 2018
546b310
增加测试
minbaby Nov 14, 2018
e35dc3c
static method create
minbaby Nov 14, 2018
d2a64b0
it test chaining
minbaby Nov 15, 2018
9b5f829
update count+iterator+offsetExists+OffsetGet
minbaby Nov 16, 2018
18e8962
update offsetSet
minbaby Nov 17, 2018
7794911
修复 circleci 更新导致无法测试通过的问题
minbaby Nov 17, 2018
99ed186
更新配置+offset unset test
minbaby Nov 17, 2018
29f6093
test pass
minbaby Nov 17, 2018
a241c6d
出来一点问题,想想怎么解决
minbaby Nov 17, 2018
0a3633c
可编译通过,测试为通过
minbaby Nov 18, 2018
c23a20f
同上
minbaby Nov 18, 2018
80887dd
注释测试不通过的用例
minbaby Nov 18, 2018
ba74851
update ci config
minbaby Nov 18, 2018
b30b0af
update
minbaby Nov 18, 2018
b0d8f52
build test create
minbaby Nov 18, 2018
fe844e6
static create method
minbaby Nov 18, 2018
d692f69
发现开启xdebug 程序会崩溃,最终也没有解决
minbaby Nov 19, 2018
6beb5a2
取巧,调用 mb_string 的方法
minbaby Nov 19, 2018
7098f98
优惠函数调用
minbaby Nov 19, 2018
07887c6
还有问题,等待解决
minbaby Nov 20, 2018
0df9581
迭代搞起来
minbaby Nov 20, 2018
c7b878d
ArrayAccess
minbaby Nov 21, 2018
dd7a100
更新一波代码,测试暂时还跑不通
minbaby Nov 22, 2018
e45e091
update readme
minbaby Nov 23, 2018
c93eb8b
Merge branch 'feature/stringy' of github.com:minbaby/php-ext-startup …
minbaby Nov 23, 2018
2109ce0
update
minbaby Nov 23, 2018
684be9e
update
minbaby Nov 23, 2018
ceb3227
update
minbaby Nov 24, 2018
23458ea
update lock file && typo
minbaby Nov 24, 2018
d18a08c
merge master
minbaby Nov 24, 2018
9116b61
rename dir && fetch scripts
minbaby Nov 27, 2018
9097218
update
minbaby Nov 27, 2018
731b870
update scripts
minbaby Nov 27, 2018
374ee3a
update
minbaby Nov 27, 2018
d4066b7
Merge branch 'feature/stringy' of github.com:minbaby/php-ext-startup …
minbaby Nov 27, 2018
d4da956
test swapCase
minbaby Nov 27, 2018
b504e8b
tab to space
minbaby Nov 30, 2018
728866a
update
minbaby Nov 30, 2018
fa684ec
哎呀,这个终于可以了
minbaby Dec 1, 2018
3cb7592
有问题,暂时解决了
minbaby Dec 1, 2018
97026e3
条件分支没处理
minbaby Dec 2, 2018
9290c7e
fix redefine
minbaby Dec 2, 2018
8d099cd
append test+php+ext
minbaby Dec 2, 2018
6791580
Merge pull request #5 from minbaby/feature/stringy-append
minbaby Dec 2, 2018
1ce577e
fix typo
minbaby Dec 2, 2018
7667b50
prepend test+php+ext
minbaby Dec 2, 2018
2655c77
Merge pull request #6 from minbaby/feature/stringy-prepend
minbaby Dec 2, 2018
34ef961
完成 chars 方法测试方法
minbaby Dec 2, 2018
139aa30
Merge pull request #7 from minbaby/feature/stringy-chars
minbaby Dec 2, 2018
4deb831
update
minbaby Dec 2, 2018
ec96e26
Merge pull request #8 from minbaby/feature/stringy-add-scripts
minbaby Dec 2, 2018
f03ca11
c 扩展没有调通
minbaby Dec 2, 2018
680de73
测试通过
minbaby Dec 3, 2018
7fc11b1
Merge pull request #9 from minbaby/feature/stringy-lines
minbaby Dec 3, 2018
c74f87a
update circleci yml
minbaby Dec 4, 2018
07e9501
rename && fix typo
minbaby Dec 4, 2018
118e089
支持php7.0
minbaby Dec 4, 2018
6b52b65
Merge pull request #10 from minbaby/feature/circleci-multiplue-php-ve…
minbaby Dec 4, 2018
04b3fed
upperCaseFirst spec & fix func
minbaby Dec 4, 2018
99a08fc
method lowerCaseFirst (#11)
minbaby Dec 4, 2018
ce80520
regexReplace test + php + TODO:ext
minbaby Dec 5, 2018
73c1ed3
fix regexreplace
minbaby Dec 6, 2018
bf79d61
trim test+php+ext (#15)
minbaby Dec 8, 2018
ece320a
Feature/stringy camelize (#16)
minbaby Dec 8, 2018
86c1ca8
Feature/stringy trim left (#17)
minbaby Dec 8, 2018
0f6c9d2
stringy trimRight test+php+ext (#18)
minbaby Dec 8, 2018
7dbc1e0
stringy-at 补充test (#20)
minbaby Dec 9, 2018
9a87476
stringy-between, test+php+ext (#21)
minbaby Dec 9, 2018
aa851a0
stringy::contains test+php+ext (#22)
minbaby Dec 9, 2018
1269693
stringy-containsAll test+php+ext (#23)
minbaby Dec 11, 2018
3cc01bd
do code coverage something (#24)
minbaby Dec 12, 2018
ae6b22f
stringy-split test (#25)
minbaby Dec 12, 2018
c5d7c12
Stringy split (#26)
minbaby Dec 12, 2018
c50ee0e
stringy-collapseWhiteSpace test+php+ext (#27)
minbaby Dec 13, 2018
2b4f412
stringy-indexOf test (#28)
minbaby Dec 14, 2018
0978ee4
stringy-containsAny test+php+ext (#29)
minbaby Dec 14, 2018
e42774a
Feature/stringy count substr (#30)
minbaby Dec 15, 2018
c392f76
stringy-delimit test+php+ext (#31)
minbaby Dec 15, 2018
273bace
stringy test+php+ext (#32)
minbaby Dec 22, 2018
d35f5dc
stringy test+php+ext (#33)
minbaby Dec 22, 2018
8aab183
Stringy-endsWithAny test+php+ext (#34)
minbaby Dec 22, 2018
117e439
update test for coverage (#35)
minbaby Dec 22, 2018
5624d7d
stringy startsWith test+ext+php (#36)
minbaby Jan 1, 2019
b74b466
update (#37)
minbaby Jan 1, 2019
8415cc4
stringy/ensureRight test+ext+php (#38)
minbaby Jan 3, 2019
ba34900
stringy/first test+ext+php
minbaby Jan 3, 2019
4ed5366
Apply fixes from StyleCI (#39)
minbaby Jan 7, 2019
87537aa
[skip ci] 更显安装脚本
minbaby Jan 13, 2019
adc5a11
Feature/stringy is alpha (#41)
minbaby Jan 13, 2019
409efba
Feature/stringy isBlank (#43)
minbaby Jan 13, 2019
347cab5
stringy-hasLowerCase (#44)
minbaby Jan 13, 2019
6863d61
stringy-html-encode-decode (#45)
minbaby Jan 13, 2019
a2a3bed
[skip ci] 修改一下环境初始化脚本
minbaby Jan 14, 2019
90dfec2
stringy-hasUpperCase test+ext+php (#46)
minbaby Jan 15, 2019
e415994
Feature/stringy remove left remove right (#47)
minbaby Jan 17, 2019
cd50bd3
stringy-humanize (#48)
minbaby Jan 17, 2019
d806360
stringy-insert (#49)
minbaby Jan 18, 2019
550ed93
stringy/{length,isUpperCase,isLowerCase,isHexadecimal,isAlphanumeric}…
minbaby Jan 18, 2019
e60e730
stringy-isJson (#51)
minbaby Jan 19, 2019
0324bc3
stringy-isSerialized php+ext+test (#52)
minbaby Feb 5, 2019
8c43562
Feature/stringy is base64 php+ext+test (#53)
minbaby Feb 7, 2019
d5e7e64
Feature/stringy longest common (#54)
minbaby Feb 25, 2019
a1e43b5
Feature/pad (#55)
minbaby Mar 3, 2019
03e03cf
Merge branch 'master' into feature/stringy
minbaby Mar 8, 2019
67fc07f
Feature/repeat+ replace (#57)
minbaby Mar 20, 2019
043902c
Feature/to (#58)
minbaby May 7, 2019
98dc4c0
toSpaces (#59)
minbaby May 8, 2019
d3abc61
优化
minbaby May 12, 2019
be5ec58
fix test
minbaby Jun 22, 2019
6543199
underscored (#60)
minbaby Jun 22, 2019
e2d601a
完成 (#61)
minbaby Jun 25, 2019
27ad9b3
truncate (#62)
minbaby Jul 24, 2019
9e4daae
搞定 (#63)
minbaby Jul 24, 2019
872b0ba
add drone
minbaby Apr 7, 2020
98fd00b
update lib
minbaby Apr 7, 2020
cc829c2
update
minbaby Apr 7, 2020
1acd5c9
Merge pull request 'feature/stringy-toTabs' (#2) from feature/stringy…
Apr 7, 2020
2412a14
toSpaces
minbaby Apr 7, 2020
fbda8e4
test drone env
minbaby Apr 7, 2020
4e5f10d
Merge pull request 'toSpaces' (#3) from feature/stringy-toSpaces into…
Apr 7, 2020
efe0b05
完成
minbaby Jul 5, 2020
0750281
test
minbaby Jul 5, 2020
a05688d
pre install dist
minbaby Jul 5, 2020
288b093
修改依赖
minbaby Jul 5, 2020
c7572fc
fix pre-source
minbaby Jul 5, 2020
1b58329
Merge pull request 'feature/stringy-toBoolean' (#5) from feature/stri…
Jul 5, 2020
b7bb53b
简化操作
minbaby Oct 19, 2020
fe83881
update
minbaby Oct 19, 2020
83ead7d
update
Oct 20, 2020
3289ca2
Merge pull request 'titeize' (#6) from feature/stringy-titeize into f…
Oct 20, 2020
1cbbdf7
remove phpdbg
Oct 21, 2020
de32592
进度内置&注释一些拓展
Dec 15, 2020
e18f535
stringy-reverse
Dec 15, 2020
843c7ba
73 + 74
Dec 15, 2020
69dad68
Merge pull request #64 from minbaby/feature/stringy-reverse
minbaby Dec 15, 2020
9ee2fe2
测试没有完全
Dec 15, 2020
8364068
修复boBoolen的bug
Dec 16, 2020
98e1c7a
Merge pull request #65 from minbaby/feature/stringy-safeTruncate
minbaby Dec 16, 2020
f4537b4
merge stringy
Dec 16, 2020
8b489ca
titleize
Dec 16, 2020
fe0facf
Merge pull request #66 from minbaby/feature/stringy-titeize
minbaby Dec 16, 2020
f34cdab
fix collapseWhitespace
Dec 16, 2020
04d3345
Merge pull request #67 from minbaby/feature/fix-collapseWhitespace
minbaby Dec 16, 2020
27124fa
shuffle
Dec 16, 2020
0738b7b
Merge pull request #68 from minbaby/feature/stringy-shuffle
minbaby Dec 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 52 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,60 @@
#
version: 2
jobs:
build:
branches:
# only:
# - master # list of branches to build
# - develop
ignore:
- feature/*
test-php-common: &common-test
docker:
# specify the version you desire here
- image: circleci/php:7.1-browsers

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mysql:9.4

working_directory: ~/repo

steps:
- checkout

- run:
name: startup install
command: phpize && ./configure && make && sudo make install

- run:
name: composer install
command: composer install

- run:
name: run test
command: ./vendor/bin/kahlan

- run:
name: cp docker-php-ext-start.ini
command: sudo cp .circleci/docker-php-ext-startup.ini /usr/local/etc/php/conf.d/
- run:
name: php version
command: php -v
- checkout
- run:
name: composer install
command: composer install --no-interaction --prefer-source
- run:
name: run test
command: ./vendor/bin/kahlan
- run:
name: upload coverage
command: bash <(curl -s https://codecov.io/bash)
- run:
name: startup install
command: phpize && ./configure && make && sudo make install
- run:
name: enable startup
command: sudo cp .circleci/docker-php-ext-startup.ini /usr/local/etc/php/conf.d/
- run:
name: run test
command: ./vendor/bin/kahlan
test-php74:
<<: *common-test
docker:
- image: circleci/php:7.4-browsers
test-php73:
<<: *common-test
docker:
- image: circleci/php:7.3-browsers
test-php72:
<<: *common-test
docker:
- image: circleci/php:7.2-browsers
test-php71:
<<: *common-test
docker:
- image: circleci/php:7.1-browsers
test-php70:
<<: *common-test
docker:
- image: circleci/php:7.0-browsers
workflows:
version: 2
build:
jobs:
- test-php70
- test-php71
- test-php72
- test-php73
- test-php74

- run:
name: enable startup
command: sudo docker-php-ext-enable startup

- run:
name: run test
command: ./vendor/bin/kahlan
6 changes: 6 additions & 0 deletions .clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-I/home/minbaby-debain/.phpbrew/php/php-7.1.23/include/php
-I/home/minbaby-debain/.phpbrew/php/php-7.1.23/include/php/main
-I/home/minbaby-debain/.phpbrew/php/php-7.1.23/include/php/TSRM
-I/home/minbaby-debain/.phpbrew/php/php-7.1.23/include/php/Zend
-I/home/minbaby-debain/.phpbrew/php/php-7.1.23/include/php/ext
-I/home/minbaby-debain/.phpbrew/php/php-7.1.23/include/php/ext/date/lib
50 changes: 50 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
kind: pipeline
type: docker
name: php-ext-startup test

steps:
- name: install vendor
image: composer:1
commands:
- php -v
- composer install -vvv --profile --no-interaction
- name: build-ext(7.1)
image: php:7.1-cli
commands:
- php -v
- ./vendor/bin/kahlan
- phpize && ./configure && make && make install
- cp .circleci/docker-php-ext-startup.ini /usr/local/etc/php/conf.d/
- ./vendor/bin/kahlan
- name: build-ext(7.2)
image: php:7.2-cli
commands:
- php -v
- ./vendor/bin/kahlan
- phpize && ./configure && make && make install
- cp .circleci/docker-php-ext-startup.ini /usr/local/etc/php/conf.d/
- ./vendor/bin/kahlan
- name: build-ext(7.3)
image: php:7.3-cli
commands:
- php -v
- ./vendor/bin/kahlan
- phpize && ./configure && make && make install
- cp .circleci/docker-php-ext-startup.ini /usr/local/etc/php/conf.d/
- ./vendor/bin/kahlan
# - name: build-ext(7.4)
# image: php:7.4-cli
# commands:
# - php -v
# - ./vendor/bin/kahlan
# - phpize && ./configure && make && make install
# - cp .circleci/docker-php-ext-startup.ini /usr/local/etc/php/conf.d/
# - ./vendor/bin/kahlan
- name: send-wechat
image: erguotou/drone-instant-access
settings:
channel:
from_secret: CHANNEL
head: "[${DRONE_REPO}] Build Status"
body: "[${DRONE_REPO}] ${DRONE_BUILD_STATUS} at ${DRONE_BRANCH} branch"
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{php,c,h}]
charset = utf-8
indent_size = 4
indent_style = space

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

# Matches the exact files either package.json or .travis.yml
[*.{json,yml}]
indent_style = space
indent_size = 2
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.deps
*.lo
*.la
*.so
.libs
acinclude.m4
aclocal.m4
Expand All @@ -14,6 +15,7 @@ config.nice
config.status
config.sub
configure
configure.ac
configure.in
include
install-sh
Expand All @@ -35,12 +37,24 @@ tests/*/*.log
tests/*/*.sh

# minbaby
.vscode
# .vscode
tags
GRTAGS
GTAGS
GPATH

/vendor/
*.loT
/nbproject/private/
/core
/.gdb_history
peda-session-php.txt
/coverage.xml
/.vscode/ipch

#clion
/.idea/
CMakeCache.txt
/CMakeFiles/
/cmake-build-debug/
cmake_install.cmake
php_ext_startup.cbp
29 changes: 29 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"~/.phpbrew/build/php-7.2.34/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
},
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"~/.phpbrew/build/php-7.2.34/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
13 changes: 13 additions & 0 deletions .vscode/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+k ctrl+b",
"command": "workbench.action.tasks.runTask",
"args": "run build"
},
{
"key": "ctrl+k ctrl+t",
"command": "workbench.action.tasks.runTask",
"args": "run test"
}
]
33 changes: 33 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"files.associations": {
"*.inc": "php",
"*.h": "c",
"__locale": "c",
"__string": "c",
"string": "c",
"string_view": "c",
"array": "c",
"initializer_list": "c",
"utility": "c",
"sstream": "c",
"istream": "c",
"ostream": "c",
"functional": "c",
"tuple": "c",
"type_traits": "c",
"random": "c"
},
"editor.mouseWheelZoom": false,
"files.autoSave": "onFocusChange",
"editor.fontSize": 14,
"editor.renderWhitespace": "boundary",
"editor.cursorStyle": "line-thin",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true
},
"editor.minimap.enabled": true
}
70 changes: 70 additions & 0 deletions .vscode/snnipt.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"itf": {
"prefix": "ift",
"scope": "php",
"body": [
"it('test $1', function () {",
" $0",
"});"
],
"description": "it function scope"
},
"cuf": {
"prefix": "cuf",
"scope": "c,h",
"body": [
"zval func = {};",
"ZVAL_STRING(&func, \"$1\");",
"call_user_function(NULL, NULL, &func, ${2:return_value}, 0, NULL);"
],
"description": "args"
},
"cufa": {
"prefix": "cufa",
"scope": "c,h",
"body": [
"zval ${1:func}, args[] = {",
" $4",
"};",
"ZVAL_STRING(&${1:func}, \"$0\");",
"call_user_function(NULL, NULL, &${1:func}, ${3:return_value}, $2, args);"
],
"description": "args"
},
"argparse": {
"prefix": "argparse",
"scope": "c,h",
"body": [
"ZEND_PARSE_PARAMETERS_START($1, $2)",
" Z_PARAM_$0",
"ZEND_PARSE_PARAMETERS_END();"
],
"description": "args"
},
"argdefine": {
"prefix": "argdefine",
"scope": "c,h",
"body": [
"ZEND_BEGIN_ARG_INFO($1, $2)",
" ZEND_ARG_INFO(0, $0)",
"ZEND_END_ARG_INFO();"
],
"description": "args"
}
}
Loading