Skip to content

Commit

Permalink
Update copyright notices, upgrade nixos to 24.05, add PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Sep 28, 2024
1 parent 29ab657 commit f7defd3
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 55 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -54,6 +55,7 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -124,9 +126,9 @@ jobs:
key: nix-store.nar-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock') }}
restore-keys: nix-store.nar-${{ runner.os }}-

- uses: cachix/install-nix-action@v25
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-23.11
nix_path: nixpkgs=channel:nixos-24.05

- name: Import Nix Store Cache
if: "steps.nix-cache.outputs.cache-hit == 'true'"
Expand Down
14 changes: 14 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright (c) anno Domini nostri Jesu Christi MMXXIV John Boehr & contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

m4_include(m4/ax_require_defined.m4)
m4_include(m4/ax_prepend_flag.m4)
Expand Down
58 changes: 36 additions & 22 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 29 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# Copyright (c) anno Domini nostri Jesu Christi MMXXIV John Boehr & contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{
description = "php-vyrtue";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils = {
url = "github:numtide/flake-utils";
};
Expand All @@ -26,6 +41,7 @@
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
flake-utils,
gitignore,
pre-commit-hooks,
Expand All @@ -34,6 +50,7 @@
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
lib = pkgs.lib;

src' = gitignore.lib.gitignoreSource ./.;
Expand Down Expand Up @@ -93,9 +110,10 @@
actionlint.enable = true;
alejandra.enable = true;
alejandra.excludes = ["\/vendor\/"];
clang-format.enable = true;
clang-format.types_or = ["c" "c++"];
clang-format.files = "\\.(c|h)$";
# I hate formatters
#clang-format.enable = true;
#clang-format.types_or = ["c" "c++"];
#clang-format.files = "\\.(c|h)$";
markdownlint.enable = true;
markdownlint.excludes = ["LICENSE\.md"];
shellcheck.enable = true;
Expand All @@ -106,6 +124,7 @@
php81 = makePackage {php = pkgs.php81;};
php82 = makePackage {php = pkgs.php82;};
php83 = makePackage {php = pkgs.php83;};
php84 = makePackage {php = pkgs-unstable.php84;};
php81-debug = makePackage {
php = pkgs.php81;
debugSupport = true;
Expand All @@ -118,6 +137,10 @@
php = pkgs.php83;
debugSupport = true;
};
php84-debug = makePackage {
php = pkgs-unstable.php84;
debugSupport = true;
};
default = php81;
};

Expand Down Expand Up @@ -155,6 +178,8 @@
php82-debug = makeCheck packages.php82-debug;
php83 = makeCheck packages.php83;
php83-debug = makeCheck packages.php83-debug;
php84 = makeCheck packages.php84;
php84-debug = makeCheck packages.php84-debug;
};

formatter = pkgs.alejandra;
Expand Down
4 changes: 1 addition & 3 deletions php_vyrtue.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
4 changes: 1 addition & 3 deletions src/context.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
4 changes: 1 addition & 3 deletions src/context.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
4 changes: 1 addition & 3 deletions src/debug.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
11 changes: 8 additions & 3 deletions src/extension.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down Expand Up @@ -96,6 +94,9 @@ static PHP_MSHUTDOWN_FUNCTION(vyrtue)
return SUCCESS;
}

const char *PHP_VYRTUE_MOTD =
"Think not that I am come to send peace on earth: I came not to send peace, but a sword. Matthew 10:34";

static PHP_MINFO_FUNCTION(vyrtue)
{
php_info_print_table_start();
Expand Down Expand Up @@ -139,6 +140,10 @@ static PHP_MINFO_FUNCTION(vyrtue)
ZEND_HASH_FOREACH_END();

php_info_print_table_end();

php_info_print_box_start(0);
PUTS(PHP_VYRTUE_MOTD);
php_info_print_box_end();
}

static PHP_GINIT_FUNCTION(vyrtue)
Expand Down
4 changes: 1 addition & 3 deletions src/private.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
4 changes: 1 addition & 3 deletions src/process.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
4 changes: 1 addition & 3 deletions src/visitor.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down
4 changes: 1 addition & 3 deletions src/visitor.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Copyright (C) 2024 John Boehr & contributors
*
* This file is part of php-vyrtue.
* Copyright (c) anno Domini nostri Jesu Christi MMXVI-MMXXIV John Boehr & contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Expand Down

0 comments on commit f7defd3

Please sign in to comment.