Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2

[*.json]
indent_style = space
indent_size = 4
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:
file: ./coverage.xml

sqlite:
needs: lint
name: SQLite PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ build/
clover.xml
clover.json
.php_cs.cache
/.phpunit.result.cache
.phpunit.result.cache
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Spiral Scout
Copyright (c) 2021 Spiral Scout

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
92 changes: 58 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,60 @@
{
"name": "cycle/database",
"type": "library",
"description": "DBAL, schema introspection, migration and pagination",
"license": "MIT",
"authors": [
{
"name": "Anton Titov / Wolfy-J",
"email": "[email protected]"
}
],
"require": {
"php": ">=8.0",
"ext-pdo": "*",
"spiral/core": "^2.7",
"spiral/logger": "^2.7",
"spiral/pagination": "^2.7"
},
"require-dev": {
"phpunit/phpunit": "~8.0",
"mockery/mockery": "^1.1",
"spiral/dumper": "^2.7",
"spiral/code-style": "^1.0",
"spiral/tokenizer": "^2.7"
},
"autoload": {
"psr-4": {
"Cycle\\Database\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Cycle\\Database\\Tests\\": "tests/Database/"
}
}
"name": "cycle/database",
"type": "library",
"description": "DBAL, schema introspection, migration and pagination",
"license": "MIT",
"authors": [
{
"name": "Anton Titov / Wolfy-J",
"email": "[email protected]"
}
],
"replace": {
"spiral/database": "^2.0"
},
"require": {
"php": ">=8.0",
"ext-pdo": "*",
"spiral/core": "^2.8",
"spiral/logger": "^2.8",
"spiral/pagination": "^2.8"
},
"autoload": {
"files": [
"src/polyfill.php"
],
"psr-4": {
"Cycle\\Database\\": "src"
}
},
"require-dev": {
"vimeo/psalm": "^4.10",
"phpunit/phpunit": "^8.5|^9.0",
"mockery/mockery": "^1.3",
"spiral/dumper": "^2.8",
"spiral/code-style": "^1.0",
"spiral/tokenizer": "^2.8"
},
"autoload-dev": {
"psr-4": {
"Cycle\\Database\\Tests\\": "tests/Database"
}
},
"scripts": {
"test": [
"phpcs --standard=phpcs.xml",
"psalm --no-cache",
"phpunit"
]
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
45 changes: 45 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Spiral Framework Code Style Ruleset">
<!-- config -->
<rule ref="vendor/spiral/code-style/config/ruleset.xml" />

<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" extend="true">
<!-- deprecated/aliased functions -->
<element key="join" value="implode" />
<element key="chop" value="rtrim" />
<element key="strchr" value="strstr" />
<element key="show_source" value="highlight_file" />
<element key="ini_alter" value="ini_set" />
<element key="dns_check_record" value="checkdnsrr" />
<element key="dns_get_mx" value="getmxrr" />
<element key="doubleval" value="floatval" />
<element key="is_long" value="is_int" />
<element key="is_integer" value="is_int" />
<element key="is_double" value="is_float" />
<element key="is_real" value="is_float" />
<element key="fputs" value="fwrite" />
<element key="set_file_buffer" value="stream_set_write_buffer" />
<element key="set_socket_blocking" value="stream_set_blocking" />
<element key="socket_set_blocking" value="stream_set_blocking" />
<element key="stream_register_wrapper" value="stream_wrapper_register" />
<element key="socket_set_timeout" value="stream_set_timeout" />
<element key="socket_get_status" value="stream_get_meta_data" />
<element key="is_writeable" value="is_writable" />
<element key="pos" value="current" />
<element key="sizeof" value="count" />

<!-- deprecated/aliased operators -->
<element key="delete" value="unset" />
<element key="print" value="echo" />
<element key="create_function" value="null" />
</property>
</properties>
</rule>

<arg name="colors"/>

<!-- includes -->
<file>./src</file>
</ruleset>
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
<directory>src/</directory>
</whitelist>
</filter>
</phpunit>
</phpunit>
26 changes: 26 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<psalm
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorLevel="7"
hoistConstants="true"
resolveFromConfigFile="true"
allowPhpStormGenerics="true"
findUnusedPsalmSuppress="true"
findUnusedVariablesAndParams="true"
ensureArrayStringOffsetsExist="true"
addParamDefaultToDocblockType="true"
>
<issueHandlers>
<LessSpecificReturnStatement errorLevel="suppress" />
<MoreSpecificReturnType errorLevel="suppress" />
<UnusedPsalmSuppress errorLevel="suppress" />
</issueHandlers>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
Loading