Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add arginfo for all functions #11

Merged
merged 1 commit into from
Sep 24, 2020

Conversation

remicollet
Copy link
Contributor

@remicollet remicollet commented Sep 23, 2020

  • drop support for PHP 4.x
  • add compatibility with PHP 8

Careful review needed as this is quite a huge work, and a mistake is quite easy

Using PHP_VERSION : 8.0.0beta4

=====================================================================
PASS yaz_ccl_parse [tests/ccl.phpt] 
PASS yaz_connect [tests/connect.phpt] 
PASS cql [tests/cql.phpt] 
PASS yaz_database [tests/database.phpt] 
PASS yaz_record [tests/record.phpt] 
PASS yaz_connect [tests/scan.phpt] 
=====================================================================

@remicollet
Copy link
Contributor Author

Reflection:

$ php -n -d extension=modules/yaz.so --re yaz 
Extension [ <persistent> extension #16 yaz version 1.2.3 ] {

  - INI {
    Entry [ yaz.max_links <ALL> ]
      Current = '100'
    }
    Entry [ yaz.keepalive <ALL> ]
      Current = '120'
    }
    Entry [ yaz.log_file <ALL> ]
      Current = ''
    }
    Entry [ yaz.log_mask <ALL> ]
      Current = ''
    }
  }

  - Constants [10] {
    Constant [ int ZOOM_EVENT_NONE ] { 0 }
    Constant [ int ZOOM_EVENT_CONNECT ] { 1 }
    Constant [ int ZOOM_EVENT_SEND_DATA ] { 2 }
    Constant [ int ZOOM_EVENT_RECV_DATA ] { 3 }
    Constant [ int ZOOM_EVENT_TIMEOUT ] { 4 }
    Constant [ int ZOOM_EVENT_UNKNOWN ] { 5 }
    Constant [ int ZOOM_EVENT_SEND_APDU ] { 6 }
    Constant [ int ZOOM_EVENT_RECV_APDU ] { 7 }
    Constant [ int ZOOM_EVENT_RECV_RECORD ] { 8 }
    Constant [ int ZOOM_EVENT_RECV_SEARCH ] { 9 }
  }

  - Functions {
    Function [ <internal:yaz> function yaz_connect ] {

      - Parameters [2] {
        Parameter #0 [ <required> $url ]
        Parameter #1 [ <optional> $options = <default> ]
      }
    }
    Function [ <internal:yaz> function yaz_close ] {

      - Parameters [1] {
        Parameter #0 [ <required> $id ]
      }
    }
    Function [ <internal:yaz> function yaz_search ] {

      - Parameters [3] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $type ]
        Parameter #2 [ <required> $query ]
      }
    }
    Function [ <internal:yaz> function yaz_wait ] {

      - Parameters [1] {
        Parameter #0 [ <optional> &$options = <default> ]
      }
    }
    Function [ <internal:yaz> function yaz_errno ] {

      - Parameters [1] {
        Parameter #0 [ <required> $id ]
      }
    }
    Function [ <internal:yaz> function yaz_error ] {

      - Parameters [1] {
        Parameter #0 [ <required> $id ]
      }
    }
    Function [ <internal:yaz> function yaz_addinfo ] {

      - Parameters [1] {
        Parameter #0 [ <required> $id ]
      }
    }
    Function [ <internal:yaz> function yaz_hits ] {

      - Parameters [3] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <optional> &$searchresult = <default> ]
        Parameter #2 [ <optional> $query = <default> ]
      }
    }
    Function [ <internal:yaz> function yaz_record ] {

      - Parameters [3] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $pos ]
        Parameter #2 [ <required> $type ]
      }
    }
    Function [ <internal:yaz> function yaz_syntax ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $syntax ]
      }
    }
    Function [ <internal:yaz> function yaz_element ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $elementsetname ]
      }
    }
    Function [ <internal:yaz> function yaz_range ] {

      - Parameters [3] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $start ]
        Parameter #2 [ <required> $number ]
      }
    }
    Function [ <internal:yaz> function yaz_itemorder ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $package ]
      }
    }
    Function [ <internal:yaz> function yaz_es_result ] {

      - Parameters [1] {
        Parameter #0 [ <required> $id ]
      }
    }
    Function [ <internal:yaz> function yaz_scan ] {

      - Parameters [4] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $type ]
        Parameter #2 [ <required> $query ]
        Parameter #3 [ <optional> $flags = <default> ]
      }
    }
    Function [ <internal:yaz> function yaz_scan_result ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> &$options ]
      }
    }
    Function [ <internal:yaz> function yaz_present ] {

      - Parameters [1] {
        Parameter #0 [ <required> $id ]
      }
    }
    Function [ <internal:yaz> function yaz_ccl_conf ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $package ]
      }
    }
    Function [ <internal:yaz> function yaz_ccl_parse ] {

      - Parameters [3] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $query ]
        Parameter #2 [ <required> &$result ]
      }
    }
    Function [ <internal:yaz> function yaz_cql_parse ] {

      - Parameters [4] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $cql ]
        Parameter #2 [ <required> &$result ]
        Parameter #3 [ <required> $rev ]
      }
    }
    Function [ <internal:yaz> function yaz_cql_conf ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $package ]
      }
    }
    Function [ <internal:yaz> function yaz_database ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $package ]
      }
    }
    Function [ <internal:yaz> function yaz_sort ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $sortspec ]
      }
    }
    Function [ <internal:yaz> function yaz_schema ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $schema ]
      }
    }
    Function [ <internal:yaz> function yaz_set_option ] {

      - Parameters [3] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $options_or_name ]
        Parameter #2 [ <optional> $value = <default> ]
      }
    }
    Function [ <internal:yaz> function yaz_get_option ] {

      - Parameters [2] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $name ]
      }
    }
    Function [ <internal:yaz> function yaz_es ] {

      - Parameters [3] {
        Parameter #0 [ <required> $id ]
        Parameter #1 [ <required> $type ]
        Parameter #2 [ <required> $package ]
      }
    }
  }
}


@remicollet remicollet changed the title add arginfo for all functions - drop support for PHP 4.x - add compat… add arginfo for all functions Sep 23, 2020
@dltj
Copy link
Contributor

dltj commented Sep 23, 2020

Thank you, @remicollet — I've logged this in our internal issue tracker.

@adamdickmeiss adamdickmeiss merged commit 5e79729 into indexdata:master Sep 24, 2020
@adamdickmeiss
Copy link
Contributor

Thx.. Found a few typos in arg_info. Easy to fix.

@remicollet remicollet deleted the issue-php8 branch September 25, 2020 04:45
bpfoley added a commit to bpfoley/dproofreaders that referenced this pull request Feb 16, 2024
It turns out the PHPStan error when analyzing this file was due to an
old version of phpyaz on the dev machine. The issue appears to be incorrect
metadata provided by phpyaz when using the extensions reflection API.

This was fixed in phpyaz 1.2.4.

See indexdata/phpyaz#11 (comment)
bpfoley added a commit to bpfoley/dproofreaders that referenced this pull request Feb 16, 2024
It turns out the PHPStan error when analyzing external_catalog_search.php
Was due to an old version of phpyaz on the dev machine. The issue appears
to be incorrect metadata provided by phpyaz when using PHP's extensions
reflection API.

This was fixed in phpyaz 1.2.4.

See indexdata/phpyaz#11 (comment)

Quell some incorrect linter warnings in external_catalog_search.php
exposed by this.
bpfoley added a commit to bpfoley/dproofreaders that referenced this pull request Feb 16, 2024
It turns out the PHPStan error when analyzing external_catalog_search.php
Was due to an old version of phpyaz on the dev machine. The issue appears
to be incorrect metadata provided by phpyaz when using PHP's extensions
reflection API.

This was fixed in phpyaz 1.2.4.

See indexdata/phpyaz#11 (comment)

Quell some incorrect linter warnings in external_catalog_search.php
exposed by this.
cpeel pushed a commit to DistributedProofreaders/dproofreaders that referenced this pull request Feb 18, 2024
It turns out the PHPStan error when analyzing external_catalog_search.php
Was due to an old version of phpyaz on the dev machine. The issue appears
to be incorrect metadata provided by phpyaz when using PHP's extensions
reflection API.

This was fixed in phpyaz 1.2.4.

See indexdata/phpyaz#11 (comment)

Quell some incorrect linter warnings in external_catalog_search.php
exposed by this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants